options_switches.cc 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 "atom/common/options_switches.h"
  5. namespace atom {
  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. // Whether the window should show in taskbar.
  28. const char kSkipTaskbar[] = "skipTaskbar";
  29. // Start with the kiosk mode, see Opera's page for description:
  30. // http://www.opera.com/support/mastering/kiosk/
  31. const char kKiosk[] = "kiosk";
  32. const char kSimpleFullScreen[] = "simpleFullscreen";
  33. // Make windows stays on the top of all other windows.
  34. const char kAlwaysOnTop[] = "alwaysOnTop";
  35. // Enable the NSView to accept first mouse event.
  36. const char kAcceptFirstMouse[] = "acceptFirstMouse";
  37. // Whether window size should include window frame.
  38. const char kUseContentSize[] = "useContentSize";
  39. // Whether window zoom should be to page width.
  40. const char kZoomToPageWidth[] = "zoomToPageWidth";
  41. // Whether always show title text in full screen is enabled.
  42. const char kFullscreenWindowTitle[] = "fullscreenWindowTitle";
  43. // The requested title bar style for the window
  44. const char kTitleBarStyle[] = "titleBarStyle";
  45. // Tabbing identifier for the window if native tabs are enabled on macOS.
  46. const char kTabbingIdentifier[] = "tabbingIdentifier";
  47. // The menu bar is hidden unless "Alt" is pressed.
  48. const char kAutoHideMenuBar[] = "autoHideMenuBar";
  49. // Enable window to be resized larger than screen.
  50. const char kEnableLargerThanScreen[] = "enableLargerThanScreen";
  51. // Forces to use dark theme on Linux.
  52. const char kDarkTheme[] = "darkTheme";
  53. // Whether the window should be transparent.
  54. const char kTransparent[] = "transparent";
  55. // Window type hint.
  56. const char kType[] = "type";
  57. // Disable auto-hiding cursor.
  58. const char kDisableAutoHideCursor[] = "disableAutoHideCursor";
  59. // Use the macOS' standard window instead of the textured window.
  60. const char kStandardWindow[] = "standardWindow";
  61. // Default browser window background color.
  62. const char kBackgroundColor[] = "backgroundColor";
  63. // Whether the window should have a shadow.
  64. const char kHasShadow[] = "hasShadow";
  65. // Browser window opacity
  66. const char kOpacity[] = "opacity";
  67. // Whether the window can be activated.
  68. const char kFocusable[] = "focusable";
  69. // The WebPreferences.
  70. const char kWebPreferences[] = "webPreferences";
  71. // Add a vibrancy effect to the browser window
  72. const char kVibrancyType[] = "vibrancy";
  73. // The factor of which page should be zoomed.
  74. const char kZoomFactor[] = "zoomFactor";
  75. // Script that will be loaded by guest WebContents before other scripts.
  76. const char kPreloadScript[] = "preload";
  77. // Like --preload, but the passed argument is an URL.
  78. const char kPreloadURL[] = "preloadURL";
  79. // Enable the node integration.
  80. const char kNodeIntegration[] = "nodeIntegration";
  81. // Enable context isolation of Electron APIs and preload script
  82. const char kContextIsolation[] = "contextIsolation";
  83. // Instance ID of guest WebContents.
  84. const char kGuestInstanceID[] = "guestInstanceId";
  85. // Web runtime features.
  86. const char kExperimentalFeatures[] = "experimentalFeatures";
  87. const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
  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. } // namespace options
  108. namespace switches {
  109. // Enable chromium sandbox.
  110. const char kEnableSandbox[] = "enable-sandbox";
  111. // Enable sandbox in only remote content windows.
  112. const char kEnableMixedSandbox[] = "enable-mixed-sandbox";
  113. // Enable plugins.
  114. const char kEnablePlugins[] = "enable-plugins";
  115. // Ppapi Flash path.
  116. const char kPpapiFlashPath[] = "ppapi-flash-path";
  117. // Ppapi Flash version.
  118. const char kPpapiFlashVersion[] = "ppapi-flash-version";
  119. // Disable HTTP cache.
  120. const char kDisableHttpCache[] = "disable-http-cache";
  121. // The list of standard schemes.
  122. const char kStandardSchemes[] = "standard-schemes";
  123. // Register schemes to handle service worker.
  124. const char kRegisterServiceWorkerSchemes[] = "register-service-worker-schemes";
  125. // Register schemes as secure.
  126. const char kSecureSchemes[] = "secure-schemes";
  127. // The browser process app model ID
  128. const char kAppUserModelId[] = "app-user-model-id";
  129. // The application path
  130. const char kAppPath[] = "app-path";
  131. // The context ID for this process
  132. const char kContextId[] = "context-id";
  133. // The command line switch versions of the options.
  134. const char kBackgroundColor[] = "background-color";
  135. const char kPreloadScript[] = "preload";
  136. const char kPreloadURL[] = "preload-url";
  137. const char kPreloadScripts[] = "preload-scripts";
  138. const char kNodeIntegration[] = "node-integration";
  139. const char kContextIsolation[] = "context-isolation";
  140. const char kGuestInstanceID[] = "guest-instance-id";
  141. const char kOpenerID[] = "opener-id";
  142. const char kScrollBounce[] = "scroll-bounce";
  143. const char kHiddenPage[] = "hidden-page";
  144. const char kNativeWindowOpen[] = "native-window-open";
  145. const char kWebviewTag[] = "webview-tag";
  146. // Command switch passed to renderer process to control nodeIntegration.
  147. const char kNodeIntegrationInWorker[] = "node-integration-in-worker";
  148. // Widevine options
  149. // Path to Widevine CDM binaries.
  150. const char kWidevineCdmPath[] = "widevine-cdm-path";
  151. // Widevine CDM version.
  152. const char kWidevineCdmVersion[] = "widevine-cdm-version";
  153. } // namespace switches
  154. } // namespace atom