options_switches.cc 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. const char kRoundedCorners[] = "roundedCorners";
  29. // The color to use as the theme and symbol colors respectively for Window
  30. // Controls Overlay if enabled on Windows.
  31. const char kOverlayButtonColor[] = "color";
  32. const char kOverlaySymbolColor[] = "symbolColor";
  33. // The custom height for Window Controls Overlay.
  34. const char kOverlayHeight[] = "height";
  35. // whether to keep the window out of mission control
  36. const char kHiddenInMissionControl[] = "hiddenInMissionControl";
  37. // Whether the window should show in taskbar.
  38. const char kSkipTaskbar[] = "skipTaskbar";
  39. // Start with the kiosk mode, see Opera's page for description:
  40. // http://www.opera.com/support/mastering/kiosk/
  41. const char kKiosk[] = "kiosk";
  42. const char kSimpleFullScreen[] = "simpleFullscreen";
  43. // Make windows stays on the top of all other windows.
  44. const char kAlwaysOnTop[] = "alwaysOnTop";
  45. // Enable the NSView to accept first mouse event.
  46. const char kAcceptFirstMouse[] = "acceptFirstMouse";
  47. // Whether window size should include window frame.
  48. const char kUseContentSize[] = "useContentSize";
  49. // Whether window zoom should be to page width.
  50. const char kZoomToPageWidth[] = "zoomToPageWidth";
  51. // The requested title bar style for the window
  52. const char kTitleBarStyle[] = "titleBarStyle";
  53. // Tabbing identifier for the window if native tabs are enabled on macOS.
  54. const char kTabbingIdentifier[] = "tabbingIdentifier";
  55. // The menu bar is hidden unless "Alt" is pressed.
  56. const char kAutoHideMenuBar[] = "autoHideMenuBar";
  57. // Enable window to be resized larger than screen.
  58. const char kEnableLargerThanScreen[] = "enableLargerThanScreen";
  59. // Forces to use dark theme on Linux.
  60. const char kDarkTheme[] = "darkTheme";
  61. // Whether the window should be transparent.
  62. const char kTransparent[] = "transparent";
  63. // Window type hint.
  64. const char kType[] = "type";
  65. // Disable auto-hiding cursor.
  66. const char kDisableAutoHideCursor[] = "disableAutoHideCursor";
  67. // Use the macOS' standard window instead of the textured window.
  68. const char kStandardWindow[] = "standardWindow";
  69. // Default browser window background color.
  70. const char kBackgroundColor[] = "backgroundColor";
  71. // Whether the window should have a shadow.
  72. const char kHasShadow[] = "hasShadow";
  73. // Browser window opacity
  74. const char kOpacity[] = "opacity";
  75. // Whether the window can be activated.
  76. const char kFocusable[] = "focusable";
  77. // The WebPreferences.
  78. const char kWebPreferences[] = "webPreferences";
  79. // Add a vibrancy effect to the browser window
  80. const char kVibrancyType[] = "vibrancy";
  81. // Add a vibrancy effect to the browser window.
  82. const char kBackgroundMaterial[] = "backgroundMaterial";
  83. // Specify how the material appearance should reflect window activity state on
  84. // macOS.
  85. const char kVisualEffectState[] = "visualEffectState";
  86. // The factor of which page should be zoomed.
  87. const char kZoomFactor[] = "zoomFactor";
  88. // Script that will be loaded by guest WebContents before other scripts.
  89. const char kPreloadScript[] = "preload";
  90. // Enable the node integration.
  91. const char kNodeIntegration[] = "nodeIntegration";
  92. // Enable context isolation of Electron APIs and preload script
  93. const char kContextIsolation[] = "contextIsolation";
  94. // Web runtime features.
  95. const char kExperimentalFeatures[] = "experimentalFeatures";
  96. // Enable the rubber banding effect.
  97. const char kScrollBounce[] = "scrollBounce";
  98. // Enable blink features.
  99. const char kEnableBlinkFeatures[] = "enableBlinkFeatures";
  100. // Disable blink features.
  101. const char kDisableBlinkFeatures[] = "disableBlinkFeatures";
  102. // Enable the node integration in WebWorker.
  103. const char kNodeIntegrationInWorker[] = "nodeIntegrationInWorker";
  104. // Enable the web view tag.
  105. const char kWebviewTag[] = "webviewTag";
  106. const char kCustomArgs[] = "additionalArguments";
  107. const char kPlugins[] = "plugins";
  108. const char kSandbox[] = "sandbox";
  109. const char kWebSecurity[] = "webSecurity";
  110. const char kAllowRunningInsecureContent[] = "allowRunningInsecureContent";
  111. const char kOffscreen[] = "offscreen";
  112. const char kNodeIntegrationInSubFrames[] = "nodeIntegrationInSubFrames";
  113. // Disable window resizing when HTML Fullscreen API is activated.
  114. const char kDisableHtmlFullscreenWindowResize[] =
  115. "disableHtmlFullscreenWindowResize";
  116. // Enables JavaScript support.
  117. const char kJavaScript[] = "javascript";
  118. // Enables image support.
  119. const char kImages[] = "images";
  120. // Make TextArea elements resizable.
  121. const char kTextAreasAreResizable[] = "textAreasAreResizable";
  122. // Enables WebGL support.
  123. const char kWebGL[] = "webgl";
  124. // Whether dragging and dropping a file or link onto the page causes a
  125. // navigation.
  126. const char kNavigateOnDragDrop[] = "navigateOnDragDrop";
  127. const char kHiddenPage[] = "hiddenPage";
  128. #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
  129. const char kSpellcheck[] = "spellcheck";
  130. #endif
  131. const char kEnablePreferredSizeMode[] = "enablePreferredSizeMode";
  132. const char ktitleBarOverlay[] = "titleBarOverlay";
  133. } // namespace options
  134. namespace switches {
  135. // Enable chromium sandbox.
  136. const char kEnableSandbox[] = "enable-sandbox";
  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. // Register schemes as streaming responses.
  156. const char kStreamingSchemes[] = "streaming-schemes";
  157. // Register schemes as supporting V8 code cache.
  158. const char kCodeCacheSchemes[] = "code-cache-schemes";
  159. // The browser process app model ID
  160. const char kAppUserModelId[] = "app-user-model-id";
  161. // The application path
  162. const char kAppPath[] = "app-path";
  163. // The command line switch versions of the options.
  164. const char kScrollBounce[] = "scroll-bounce";
  165. // Command switch passed to renderer process to control nodeIntegration.
  166. const char kNodeIntegrationInWorker[] = "node-integration-in-worker";
  167. // Widevine options
  168. // Path to Widevine CDM binaries.
  169. const char kWidevineCdmPath[] = "widevine-cdm-path";
  170. // Widevine CDM version.
  171. const char kWidevineCdmVersion[] = "widevine-cdm-version";
  172. // Forces the maximum disk space to be used by the disk cache, in bytes.
  173. const char kDiskCacheSize[] = "disk-cache-size";
  174. // Ignore the limit of 6 connections per host.
  175. const char kIgnoreConnectionsLimit[] = "ignore-connections-limit";
  176. // Whitelist containing servers for which Integrated Authentication is enabled.
  177. const char kAuthServerWhitelist[] = "auth-server-whitelist";
  178. // Whitelist containing servers for which Kerberos delegation is allowed.
  179. const char kAuthNegotiateDelegateWhitelist[] =
  180. "auth-negotiate-delegate-whitelist";
  181. // If set, include the port in generated Kerberos SPNs.
  182. const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port";
  183. // If set, NTLM v2 is disabled for POSIX platforms.
  184. const char kDisableNTLMv2[] = "disable-ntlm-v2";
  185. } // namespace switches
  186. } // namespace electron