options_switches.cc 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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. // Enable world safe passing of values when using "executeJavaScript"
  85. const char kWorldSafeExecuteJavaScript[] = "worldSafeExecuteJavaScript";
  86. // Instance ID of guest WebContents.
  87. const char kGuestInstanceID[] = "guestInstanceId";
  88. // Web runtime features.
  89. const char kExperimentalFeatures[] = "experimentalFeatures";
  90. // Opener window's ID.
  91. const char kOpenerID[] = "openerId";
  92. // Enable the rubber banding effect.
  93. const char kScrollBounce[] = "scrollBounce";
  94. // Enable blink features.
  95. const char kEnableBlinkFeatures[] = "enableBlinkFeatures";
  96. // Disable blink features.
  97. const char kDisableBlinkFeatures[] = "disableBlinkFeatures";
  98. // Enable the node integration in WebWorker.
  99. const char kNodeIntegrationInWorker[] = "nodeIntegrationInWorker";
  100. // Enable the web view tag.
  101. const char kWebviewTag[] = "webviewTag";
  102. const char kNativeWindowOpen[] = "nativeWindowOpen";
  103. const char kCustomArgs[] = "additionalArguments";
  104. const char kPlugins[] = "plugins";
  105. const char kSandbox[] = "sandbox";
  106. const char kWebSecurity[] = "webSecurity";
  107. const char kAllowRunningInsecureContent[] = "allowRunningInsecureContent";
  108. const char kOffscreen[] = "offscreen";
  109. const char kNodeIntegrationInSubFrames[] = "nodeIntegrationInSubFrames";
  110. // Disable window resizing when HTML Fullscreen API is activated.
  111. const char kDisableHtmlFullscreenWindowResize[] =
  112. "disableHtmlFullscreenWindowResize";
  113. // Enables JavaScript support.
  114. const char kJavaScript[] = "javascript";
  115. // Enables image support.
  116. const char kImages[] = "images";
  117. // Make TextArea elements resizable.
  118. const char kTextAreasAreResizable[] = "textAreasAreResizable";
  119. // Enables WebGL support.
  120. const char kWebGL[] = "webgl";
  121. // Whether dragging and dropping a file or link onto the page causes a
  122. // navigation.
  123. const char kNavigateOnDragDrop[] = "navigateOnDragDrop";
  124. #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
  125. const char kSpellcheck[] = "spellcheck";
  126. #endif
  127. #if BUILDFLAG(ENABLE_REMOTE_MODULE)
  128. const char kEnableRemoteModule[] = "enableRemoteModule";
  129. #endif
  130. const char kEnableWebSQL[] = "enableWebSQL";
  131. } // namespace options
  132. namespace switches {
  133. // Enable chromium sandbox.
  134. const char kEnableSandbox[] = "enable-sandbox";
  135. // Enable plugins.
  136. const char kEnablePlugins[] = "enable-plugins";
  137. // Ppapi Flash path.
  138. const char kPpapiFlashPath[] = "ppapi-flash-path";
  139. // Ppapi Flash version.
  140. const char kPpapiFlashVersion[] = "ppapi-flash-version";
  141. // Disable HTTP cache.
  142. const char kDisableHttpCache[] = "disable-http-cache";
  143. // The list of standard schemes.
  144. const char kStandardSchemes[] = "standard-schemes";
  145. // Register schemes to handle service worker.
  146. const char kServiceWorkerSchemes[] = "service-worker-schemes";
  147. // Register schemes as secure.
  148. const char kSecureSchemes[] = "secure-schemes";
  149. // Register schemes as bypassing CSP.
  150. const char kBypassCSPSchemes[] = "bypasscsp-schemes";
  151. // Register schemes as support fetch API.
  152. const char kFetchSchemes[] = "fetch-schemes";
  153. // Register schemes as CORS enabled.
  154. const char kCORSSchemes[] = "cors-schemes";
  155. // The browser process app model ID
  156. const char kAppUserModelId[] = "app-user-model-id";
  157. // The application path
  158. const char kAppPath[] = "app-path";
  159. const char kEnableApiFilteringLogging[] = "enable-api-filtering-logging";
  160. // The command line switch versions of the options.
  161. const char kBackgroundColor[] = "background-color";
  162. const char kPreloadScript[] = "preload";
  163. const char kPreloadScripts[] = "preload-scripts";
  164. const char kNodeIntegration[] = "node-integration";
  165. const char kContextIsolation[] = "context-isolation";
  166. const char kWorldSafeExecuteJavaScript[] = "world-safe-execute-javascript";
  167. const char kGuestInstanceID[] = "guest-instance-id";
  168. const char kOpenerID[] = "opener-id";
  169. const char kScrollBounce[] = "scroll-bounce";
  170. const char kHiddenPage[] = "hidden-page";
  171. const char kNativeWindowOpen[] = "native-window-open";
  172. const char kWebviewTag[] = "webview-tag";
  173. const char kDisableElectronSiteInstanceOverrides[] =
  174. "disable-electron-site-instance-overrides";
  175. const char kEnableNodeLeakageInRenderers[] = "enable-node-leakage-in-renderers";
  176. // Command switch passed to renderer process to control nodeIntegration.
  177. const char kNodeIntegrationInWorker[] = "node-integration-in-worker";
  178. // Command switch passed to renderer process to control whether node
  179. // environments will be created in sub-frames.
  180. const char kNodeIntegrationInSubFrames[] = "node-integration-in-subframes";
  181. // Command switch passed to render process to control whether WebSQL api
  182. // is allowed.
  183. const char kEnableWebSQL[] = "enable-websql";
  184. // Widevine options
  185. // Path to Widevine CDM binaries.
  186. const char kWidevineCdmPath[] = "widevine-cdm-path";
  187. // Widevine CDM version.
  188. const char kWidevineCdmVersion[] = "widevine-cdm-version";
  189. // Forces the maximum disk space to be used by the disk cache, in bytes.
  190. const char kDiskCacheSize[] = "disk-cache-size";
  191. // Ignore the limit of 6 connections per host.
  192. const char kIgnoreConnectionsLimit[] = "ignore-connections-limit";
  193. // Whitelist containing servers for which Integrated Authentication is enabled.
  194. const char kAuthServerWhitelist[] = "auth-server-whitelist";
  195. // Whitelist containing servers for which Kerberos delegation is allowed.
  196. const char kAuthNegotiateDelegateWhitelist[] =
  197. "auth-negotiate-delegate-whitelist";
  198. // If set, include the port in generated Kerberos SPNs.
  199. const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port";
  200. // If set, NTLM v2 is disabled for POSIX platforms.
  201. const char kDisableNTLMv2[] = "disable-ntlm-v2";
  202. #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
  203. const char kEnableSpellcheck[] = "enable-spellcheck";
  204. #endif
  205. #if BUILDFLAG(ENABLE_REMOTE_MODULE)
  206. const char kEnableRemoteModule[] = "enable-remote-module";
  207. #endif
  208. const char kGlobalCrashKeys[] = "global-crash-keys";
  209. } // namespace switches
  210. } // namespace electron