options_switches.cc 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. // Copyright (c) 2013 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "shell/common/options_switches.h"
  5. namespace electron {
  6. namespace options {
  7. const char kTitle[] = "title";
  8. const char kIcon[] = "icon";
  9. const char kFrame[] = "frame";
  10. const char kShow[] = "show";
  11. const char kCenter[] = "center";
  12. const char kX[] = "x";
  13. const char kY[] = "y";
  14. const char kWidth[] = "width";
  15. const char kHeight[] = "height";
  16. const char kMinWidth[] = "minWidth";
  17. const char kMinHeight[] = "minHeight";
  18. const char kMaxWidth[] = "maxWidth";
  19. const char kMaxHeight[] = "maxHeight";
  20. const char kResizable[] = "resizable";
  21. const char kMovable[] = "movable";
  22. const char kMinimizable[] = "minimizable";
  23. const char kMaximizable[] = "maximizable";
  24. const char kFullScreenable[] = "fullscreenable";
  25. const char kClosable[] = "closable";
  26. const char kFullscreen[] = "fullscreen";
  27. const char kTrafficLightPosition[] = "trafficLightPosition";
  28. // Whether the window should show in taskbar.
  29. const char kSkipTaskbar[] = "skipTaskbar";
  30. // Start with the kiosk mode, see Opera's page for description:
  31. // http://www.opera.com/support/mastering/kiosk/
  32. const char kKiosk[] = "kiosk";
  33. const char kSimpleFullScreen[] = "simpleFullscreen";
  34. // Make windows stays on the top of all other windows.
  35. const char kAlwaysOnTop[] = "alwaysOnTop";
  36. // Enable the NSView to accept first mouse event.
  37. const char kAcceptFirstMouse[] = "acceptFirstMouse";
  38. // Whether window size should include window frame.
  39. const char kUseContentSize[] = "useContentSize";
  40. // Whether window zoom should be to page width.
  41. const char kZoomToPageWidth[] = "zoomToPageWidth";
  42. // Whether always show title text in full screen is enabled.
  43. const char kFullscreenWindowTitle[] = "fullscreenWindowTitle";
  44. // The requested title bar style for the window
  45. const char kTitleBarStyle[] = "titleBarStyle";
  46. // Tabbing identifier for the window if native tabs are enabled on macOS.
  47. const char kTabbingIdentifier[] = "tabbingIdentifier";
  48. // The menu bar is hidden unless "Alt" is pressed.
  49. const char kAutoHideMenuBar[] = "autoHideMenuBar";
  50. // Enable window to be resized larger than screen.
  51. const char kEnableLargerThanScreen[] = "enableLargerThanScreen";
  52. // Forces to use dark theme on Linux.
  53. const char kDarkTheme[] = "darkTheme";
  54. // Whether the window should be transparent.
  55. const char kTransparent[] = "transparent";
  56. // Window type hint.
  57. const char kType[] = "type";
  58. // Disable auto-hiding cursor.
  59. const char kDisableAutoHideCursor[] = "disableAutoHideCursor";
  60. // Use the macOS' standard window instead of the textured window.
  61. const char kStandardWindow[] = "standardWindow";
  62. // Default browser window background color.
  63. const char kBackgroundColor[] = "backgroundColor";
  64. // Whether the window should have a shadow.
  65. const char kHasShadow[] = "hasShadow";
  66. // Browser window opacity
  67. const char kOpacity[] = "opacity";
  68. // Whether the window can be activated.
  69. const char kFocusable[] = "focusable";
  70. // The WebPreferences.
  71. const char kWebPreferences[] = "webPreferences";
  72. // Add a vibrancy effect to the browser window
  73. const char kVibrancyType[] = "vibrancy";
  74. // The factor of which page should be zoomed.
  75. const char kZoomFactor[] = "zoomFactor";
  76. // Script that will be loaded by guest WebContents before other scripts.
  77. const char kPreloadScript[] = "preload";
  78. // Like --preload, but the passed argument is an URL.
  79. const char kPreloadURL[] = "preloadURL";
  80. // Enable the node integration.
  81. const char kNodeIntegration[] = "nodeIntegration";
  82. // Enable context isolation of Electron APIs and preload script
  83. const char kContextIsolation[] = "contextIsolation";
  84. // Instance ID of guest WebContents.
  85. const char kGuestInstanceID[] = "guestInstanceId";
  86. // Web runtime features.
  87. const char kExperimentalFeatures[] = "experimentalFeatures";
  88. // Opener window's ID.
  89. const char kOpenerID[] = "openerId";
  90. // Enable the rubber banding effect.
  91. const char kScrollBounce[] = "scrollBounce";
  92. // Enable blink features.
  93. const char kEnableBlinkFeatures[] = "enableBlinkFeatures";
  94. // Disable blink features.
  95. const char kDisableBlinkFeatures[] = "disableBlinkFeatures";
  96. // Enable the node integration in WebWorker.
  97. const char kNodeIntegrationInWorker[] = "nodeIntegrationInWorker";
  98. // Enable the web view tag.
  99. const char kWebviewTag[] = "webviewTag";
  100. const char kNativeWindowOpen[] = "nativeWindowOpen";
  101. const char kCustomArgs[] = "additionalArguments";
  102. const char kPlugins[] = "plugins";
  103. const char kSandbox[] = "sandbox";
  104. const char kWebSecurity[] = "webSecurity";
  105. const char kAllowRunningInsecureContent[] = "allowRunningInsecureContent";
  106. const char kOffscreen[] = "offscreen";
  107. const char kNodeIntegrationInSubFrames[] = "nodeIntegrationInSubFrames";
  108. // Disable window resizing when HTML Fullscreen API is activated.
  109. const char kDisableHtmlFullscreenWindowResize[] =
  110. "disableHtmlFullscreenWindowResize";
  111. // Enables JavaScript support.
  112. const char kJavaScript[] = "javascript";
  113. // Enables image support.
  114. const char kImages[] = "images";
  115. // Make TextArea elements resizable.
  116. const char kTextAreasAreResizable[] = "textAreasAreResizable";
  117. // Enables WebGL support.
  118. const char kWebGL[] = "webgl";
  119. // Whether dragging and dropping a file or link onto the page causes a
  120. // navigation.
  121. const char kNavigateOnDragDrop[] = "navigateOnDragDrop";
  122. #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
  123. const char kSpellcheck[] = "spellcheck";
  124. #endif
  125. #if BUILDFLAG(ENABLE_REMOTE_MODULE)
  126. const char kEnableRemoteModule[] = "enableRemoteModule";
  127. #endif
  128. const char kEnableWebSQL[] = "enableWebSQL";
  129. } // namespace options
  130. namespace switches {
  131. // Enable chromium sandbox.
  132. const char kEnableSandbox[] = "enable-sandbox";
  133. // Enable plugins.
  134. const char kEnablePlugins[] = "enable-plugins";
  135. // Ppapi Flash path.
  136. const char kPpapiFlashPath[] = "ppapi-flash-path";
  137. // Ppapi Flash version.
  138. const char kPpapiFlashVersion[] = "ppapi-flash-version";
  139. // Disable HTTP cache.
  140. const char kDisableHttpCache[] = "disable-http-cache";
  141. // The list of standard schemes.
  142. const char kStandardSchemes[] = "standard-schemes";
  143. // Register schemes to handle service worker.
  144. const char kServiceWorkerSchemes[] = "service-worker-schemes";
  145. // Register schemes as secure.
  146. const char kSecureSchemes[] = "secure-schemes";
  147. // Register schemes as bypassing CSP.
  148. const char kBypassCSPSchemes[] = "bypasscsp-schemes";
  149. // Register schemes as support fetch API.
  150. const char kFetchSchemes[] = "fetch-schemes";
  151. // Register schemes as CORS enabled.
  152. const char kCORSSchemes[] = "cors-schemes";
  153. // The browser process app model ID
  154. const char kAppUserModelId[] = "app-user-model-id";
  155. // The application path
  156. const char kAppPath[] = "app-path";
  157. const char kEnableApiFilteringLogging[] = "enable-api-filtering-logging";
  158. // The command line switch versions of the options.
  159. const char kBackgroundColor[] = "background-color";
  160. const char kPreloadScript[] = "preload";
  161. const char kPreloadScripts[] = "preload-scripts";
  162. const char kNodeIntegration[] = "node-integration";
  163. const char kContextIsolation[] = "context-isolation";
  164. const char kGuestInstanceID[] = "guest-instance-id";
  165. const char kOpenerID[] = "opener-id";
  166. const char kScrollBounce[] = "scroll-bounce";
  167. const char kHiddenPage[] = "hidden-page";
  168. const char kNativeWindowOpen[] = "native-window-open";
  169. const char kWebviewTag[] = "webview-tag";
  170. const char kDisableElectronSiteInstanceOverrides[] =
  171. "disable-electron-site-instance-overrides";
  172. const char kEnableNodeLeakageInRenderers[] = "enable-node-leakage-in-renderers";
  173. // Command switch passed to renderer process to control nodeIntegration.
  174. const char kNodeIntegrationInWorker[] = "node-integration-in-worker";
  175. // Command switch passed to renderer process to control whether node
  176. // environments will be created in sub-frames.
  177. const char kNodeIntegrationInSubFrames[] = "node-integration-in-subframes";
  178. // Command switch passed to render process to control whether WebSQL api
  179. // is allowed.
  180. const char kEnableWebSQL[] = "enable-websql";
  181. // Widevine options
  182. // Path to Widevine CDM binaries.
  183. const char kWidevineCdmPath[] = "widevine-cdm-path";
  184. // Widevine CDM version.
  185. const char kWidevineCdmVersion[] = "widevine-cdm-version";
  186. // Forces the maximum disk space to be used by the disk cache, in bytes.
  187. const char kDiskCacheSize[] = "disk-cache-size";
  188. // Ignore the limit of 6 connections per host.
  189. const char kIgnoreConnectionsLimit[] = "ignore-connections-limit";
  190. // Whitelist containing servers for which Integrated Authentication is enabled.
  191. const char kAuthServerWhitelist[] = "auth-server-whitelist";
  192. // Whitelist containing servers for which Kerberos delegation is allowed.
  193. const char kAuthNegotiateDelegateWhitelist[] =
  194. "auth-negotiate-delegate-whitelist";
  195. // If set, include the port in generated Kerberos SPNs.
  196. const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port";
  197. // If set, NTLM v2 is disabled for POSIX platforms.
  198. const char kDisableNTLMv2[] = "disable-ntlm-v2";
  199. #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
  200. const char kEnableSpellcheck[] = "enable-spellcheck";
  201. #endif
  202. #if BUILDFLAG(ENABLE_REMOTE_MODULE)
  203. const char kEnableRemoteModule[] = "enable-remote-module";
  204. #endif
  205. } // namespace switches
  206. } // namespace electron