2014-10-31 12:17:05 -06:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 03:49:37 -06:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-12 01:04:46 -06:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 14:46:59 -06:00
|
|
|
#include "shell/common/options_switches.h"
|
2013-04-12 01:04:46 -06:00
|
|
|
|
2019-06-19 15:23:04 -06:00
|
|
|
namespace electron {
|
2013-04-12 01:04:46 -06:00
|
|
|
|
2015-11-12 22:58:31 -07:00
|
|
|
namespace options {
|
2013-04-12 01:04:46 -06:00
|
|
|
|
2018-04-17 19:55:30 -06:00
|
|
|
const char kTitle[] = "title";
|
|
|
|
const char kIcon[] = "icon";
|
|
|
|
const char kFrame[] = "frame";
|
|
|
|
const char kShow[] = "show";
|
|
|
|
const char kCenter[] = "center";
|
|
|
|
const char kX[] = "x";
|
|
|
|
const char kY[] = "y";
|
|
|
|
const char kWidth[] = "width";
|
|
|
|
const char kHeight[] = "height";
|
|
|
|
const char kMinWidth[] = "minWidth";
|
|
|
|
const char kMinHeight[] = "minHeight";
|
|
|
|
const char kMaxWidth[] = "maxWidth";
|
|
|
|
const char kMaxHeight[] = "maxHeight";
|
|
|
|
const char kResizable[] = "resizable";
|
|
|
|
const char kMovable[] = "movable";
|
|
|
|
const char kMinimizable[] = "minimizable";
|
|
|
|
const char kMaximizable[] = "maximizable";
|
2016-01-23 00:47:37 -07:00
|
|
|
const char kFullScreenable[] = "fullscreenable";
|
2018-04-17 19:55:30 -06:00
|
|
|
const char kClosable[] = "closable";
|
|
|
|
const char kFullscreen[] = "fullscreen";
|
2020-01-23 11:13:08 -07:00
|
|
|
const char kTrafficLightPosition[] = "trafficLightPosition";
|
2021-02-09 09:38:35 -07:00
|
|
|
const char kRoundedCorners[] = "roundedCorners";
|
2013-04-12 01:04:46 -06:00
|
|
|
|
2021-08-11 12:07:36 -06:00
|
|
|
// The color to use as the theme and symbol colors respectively for Window
|
|
|
|
// Controls Overlay if enabled on Windows.
|
|
|
|
const char kOverlayButtonColor[] = "color";
|
|
|
|
const char kOverlaySymbolColor[] = "symbolColor";
|
|
|
|
|
2022-01-24 15:09:21 -07:00
|
|
|
// The custom height for Window Controls Overlay.
|
|
|
|
const char kOverlayHeight[] = "height";
|
|
|
|
|
2022-11-01 14:43:42 -06:00
|
|
|
// whether to keep the window out of mission control
|
|
|
|
const char kHiddenInMissionControl[] = "hiddenInMissionControl";
|
2014-06-15 20:29:51 -06:00
|
|
|
// Whether the window should show in taskbar.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kSkipTaskbar[] = "skipTaskbar";
|
2014-06-15 20:29:51 -06:00
|
|
|
|
2013-04-12 01:04:46 -06:00
|
|
|
// Start with the kiosk mode, see Opera's page for description:
|
|
|
|
// http://www.opera.com/support/mastering/kiosk/
|
|
|
|
const char kKiosk[] = "kiosk";
|
|
|
|
|
2017-08-13 00:28:33 -06:00
|
|
|
const char kSimpleFullScreen[] = "simpleFullscreen";
|
|
|
|
|
2013-04-12 01:04:46 -06:00
|
|
|
// Make windows stays on the top of all other windows.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kAlwaysOnTop[] = "alwaysOnTop";
|
2013-04-12 01:04:46 -06:00
|
|
|
|
2014-03-15 05:28:23 -06:00
|
|
|
// Enable the NSView to accept first mouse event.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kAcceptFirstMouse[] = "acceptFirstMouse";
|
2014-03-15 05:28:23 -06:00
|
|
|
|
2014-05-15 01:18:46 -06:00
|
|
|
// Whether window size should include window frame.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kUseContentSize[] = "useContentSize";
|
2014-05-15 01:18:46 -06:00
|
|
|
|
2016-10-27 12:29:51 -06:00
|
|
|
// Whether window zoom should be to page width.
|
|
|
|
const char kZoomToPageWidth[] = "zoomToPageWidth";
|
2016-10-25 21:12:12 -06:00
|
|
|
|
2015-09-14 06:15:41 -06:00
|
|
|
// The requested title bar style for the window
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kTitleBarStyle[] = "titleBarStyle";
|
2015-09-14 06:15:41 -06:00
|
|
|
|
2017-03-27 08:15:17 -06:00
|
|
|
// Tabbing identifier for the window if native tabs are enabled on macOS.
|
|
|
|
const char kTabbingIdentifier[] = "tabbingIdentifier";
|
|
|
|
|
2014-08-06 23:47:58 -06:00
|
|
|
// The menu bar is hidden unless "Alt" is pressed.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kAutoHideMenuBar[] = "autoHideMenuBar";
|
2014-08-06 23:47:58 -06:00
|
|
|
|
2014-08-16 22:23:00 -06:00
|
|
|
// Enable window to be resized larger than screen.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kEnableLargerThanScreen[] = "enableLargerThanScreen";
|
2014-08-16 22:23:00 -06:00
|
|
|
|
2014-08-20 22:24:55 -06:00
|
|
|
// Forces to use dark theme on Linux.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kDarkTheme[] = "darkTheme";
|
2014-08-20 22:24:55 -06:00
|
|
|
|
2014-12-22 18:48:54 -07:00
|
|
|
// Whether the window should be transparent.
|
|
|
|
const char kTransparent[] = "transparent";
|
|
|
|
|
2015-02-10 21:12:22 -07:00
|
|
|
// Window type hint.
|
|
|
|
const char kType[] = "type";
|
|
|
|
|
2015-04-26 22:08:22 -06:00
|
|
|
// Disable auto-hiding cursor.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kDisableAutoHideCursor[] = "disableAutoHideCursor";
|
2015-04-26 22:08:22 -06:00
|
|
|
|
2016-06-18 07:28:22 -06:00
|
|
|
// Use the macOS' standard window instead of the textured window.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kStandardWindow[] = "standardWindow";
|
2015-05-08 14:28:24 -06:00
|
|
|
|
2015-10-21 04:17:28 -06:00
|
|
|
// Default browser window background color.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kBackgroundColor[] = "backgroundColor";
|
2015-10-21 04:17:28 -06:00
|
|
|
|
2016-01-22 17:15:49 -07:00
|
|
|
// Whether the window should have a shadow.
|
|
|
|
const char kHasShadow[] = "hasShadow";
|
|
|
|
|
2017-09-28 20:26:02 -06:00
|
|
|
// Browser window opacity
|
|
|
|
const char kOpacity[] = "opacity";
|
|
|
|
|
2016-06-13 02:10:28 -06:00
|
|
|
// Whether the window can be activated.
|
|
|
|
const char kFocusable[] = "focusable";
|
|
|
|
|
2015-11-10 07:17:27 -07:00
|
|
|
// The WebPreferences.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kWebPreferences[] = "webPreferences";
|
2015-11-10 07:17:27 -07:00
|
|
|
|
2016-11-07 13:22:41 -07:00
|
|
|
// Add a vibrancy effect to the browser window
|
|
|
|
const char kVibrancyType[] = "vibrancy";
|
|
|
|
|
2023-05-15 14:31:57 -06:00
|
|
|
// Add a vibrancy effect to the browser window.
|
|
|
|
const char kBackgroundMaterial[] = "backgroundMaterial";
|
|
|
|
|
2020-08-24 09:44:48 -06:00
|
|
|
// Specify how the material appearance should reflect window activity state on
|
|
|
|
// macOS.
|
|
|
|
const char kVisualEffectState[] = "visualEffectState";
|
|
|
|
|
2015-11-10 07:17:27 -07:00
|
|
|
// The factor of which page should be zoomed.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kZoomFactor[] = "zoomFactor";
|
2015-11-10 07:17:27 -07:00
|
|
|
|
|
|
|
// Script that will be loaded by guest WebContents before other scripts.
|
|
|
|
const char kPreloadScript[] = "preload";
|
|
|
|
|
|
|
|
// Enable the node integration.
|
2015-11-10 07:23:21 -07:00
|
|
|
const char kNodeIntegration[] = "nodeIntegration";
|
2015-11-10 07:17:27 -07:00
|
|
|
|
2016-12-15 14:20:17 -07:00
|
|
|
// Enable context isolation of Electron APIs and preload script
|
|
|
|
const char kContextIsolation[] = "contextIsolation";
|
|
|
|
|
2014-09-08 23:21:15 -06:00
|
|
|
// Web runtime features.
|
2018-04-17 19:55:30 -06:00
|
|
|
const char kExperimentalFeatures[] = "experimentalFeatures";
|
2014-09-08 20:33:31 -06:00
|
|
|
|
2016-05-05 23:57:43 -06:00
|
|
|
// Enable the rubber banding effect.
|
|
|
|
const char kScrollBounce[] = "scrollBounce";
|
|
|
|
|
2016-01-06 23:10:18 -07:00
|
|
|
// Enable blink features.
|
2018-05-25 12:13:15 -06:00
|
|
|
const char kEnableBlinkFeatures[] = "enableBlinkFeatures";
|
2016-01-06 23:10:18 -07:00
|
|
|
|
2016-06-07 14:42:42 -06:00
|
|
|
// Disable blink features.
|
|
|
|
const char kDisableBlinkFeatures[] = "disableBlinkFeatures";
|
|
|
|
|
2017-03-15 03:51:21 -06:00
|
|
|
// Enable the node integration in WebWorker.
|
|
|
|
const char kNodeIntegrationInWorker[] = "nodeIntegrationInWorker";
|
|
|
|
|
2017-05-17 14:09:24 -06:00
|
|
|
// Enable the web view tag.
|
|
|
|
const char kWebviewTag[] = "webviewTag";
|
2017-05-06 23:10:42 -06:00
|
|
|
|
2018-02-12 10:54:31 -07:00
|
|
|
const char kCustomArgs[] = "additionalArguments";
|
|
|
|
|
2018-05-29 02:09:51 -06:00
|
|
|
const char kPlugins[] = "plugins";
|
|
|
|
|
|
|
|
const char kSandbox[] = "sandbox";
|
|
|
|
|
|
|
|
const char kWebSecurity[] = "webSecurity";
|
|
|
|
|
|
|
|
const char kAllowRunningInsecureContent[] = "allowRunningInsecureContent";
|
|
|
|
|
|
|
|
const char kOffscreen[] = "offscreen";
|
|
|
|
|
2019-01-22 12:24:46 -07:00
|
|
|
const char kNodeIntegrationInSubFrames[] = "nodeIntegrationInSubFrames";
|
|
|
|
|
2019-03-07 16:29:37 -07:00
|
|
|
// Disable window resizing when HTML Fullscreen API is activated.
|
|
|
|
const char kDisableHtmlFullscreenWindowResize[] =
|
|
|
|
"disableHtmlFullscreenWindowResize";
|
|
|
|
|
2019-04-23 10:14:18 -06:00
|
|
|
// Enables JavaScript support.
|
|
|
|
const char kJavaScript[] = "javascript";
|
|
|
|
|
|
|
|
// Enables image support.
|
|
|
|
const char kImages[] = "images";
|
|
|
|
|
|
|
|
// Make TextArea elements resizable.
|
|
|
|
const char kTextAreasAreResizable[] = "textAreasAreResizable";
|
|
|
|
|
|
|
|
// Enables WebGL support.
|
|
|
|
const char kWebGL[] = "webgl";
|
|
|
|
|
|
|
|
// Whether dragging and dropping a file or link onto the page causes a
|
|
|
|
// navigation.
|
|
|
|
const char kNavigateOnDragDrop[] = "navigateOnDragDrop";
|
|
|
|
|
2020-11-10 10:06:03 -07:00
|
|
|
const char kHiddenPage[] = "hiddenPage";
|
|
|
|
|
2019-10-31 14:11:51 -06:00
|
|
|
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
|
|
|
const char kSpellcheck[] = "spellcheck";
|
|
|
|
#endif
|
|
|
|
|
2020-10-21 16:44:19 -06:00
|
|
|
const char kEnablePreferredSizeMode[] = "enablePreferredSizeMode";
|
|
|
|
|
2021-07-01 13:25:40 -06:00
|
|
|
const char ktitleBarOverlay[] = "titleBarOverlay";
|
|
|
|
|
2015-11-12 22:58:31 -07:00
|
|
|
} // namespace options
|
|
|
|
|
|
|
|
namespace switches {
|
|
|
|
|
2016-08-15 04:59:08 -06:00
|
|
|
// Enable chromium sandbox.
|
|
|
|
const char kEnableSandbox[] = "enable-sandbox";
|
|
|
|
|
2015-11-10 07:17:27 -07:00
|
|
|
// Ppapi Flash path.
|
|
|
|
const char kPpapiFlashPath[] = "ppapi-flash-path";
|
|
|
|
|
|
|
|
// Ppapi Flash version.
|
|
|
|
const char kPpapiFlashVersion[] = "ppapi-flash-version";
|
|
|
|
|
2018-08-13 17:16:04 -06:00
|
|
|
// Disable HTTP cache.
|
|
|
|
const char kDisableHttpCache[] = "disable-http-cache";
|
|
|
|
|
2016-06-08 00:46:50 -06:00
|
|
|
// The list of standard schemes.
|
|
|
|
const char kStandardSchemes[] = "standard-schemes";
|
|
|
|
|
2015-12-08 12:21:46 -07:00
|
|
|
// Register schemes to handle service worker.
|
2019-01-29 00:11:01 -07:00
|
|
|
const char kServiceWorkerSchemes[] = "service-worker-schemes";
|
2015-12-08 12:21:46 -07:00
|
|
|
|
2016-11-11 12:10:54 -07:00
|
|
|
// Register schemes as secure.
|
2016-11-14 09:20:04 -07:00
|
|
|
const char kSecureSchemes[] = "secure-schemes";
|
2016-11-11 12:10:54 -07:00
|
|
|
|
2019-01-29 00:11:01 -07:00
|
|
|
// Register schemes as bypassing CSP.
|
|
|
|
const char kBypassCSPSchemes[] = "bypasscsp-schemes";
|
|
|
|
|
|
|
|
// Register schemes as support fetch API.
|
|
|
|
const char kFetchSchemes[] = "fetch-schemes";
|
|
|
|
|
|
|
|
// Register schemes as CORS enabled.
|
|
|
|
const char kCORSSchemes[] = "cors-schemes";
|
|
|
|
|
2020-06-08 10:49:36 -06:00
|
|
|
// Register schemes as streaming responses.
|
|
|
|
const char kStreamingSchemes[] = "streaming-schemes";
|
|
|
|
|
2023-12-05 19:22:41 -07:00
|
|
|
// Register schemes as supporting V8 code cache.
|
|
|
|
const char kCodeCacheSchemes[] = "code-cache-schemes";
|
|
|
|
|
2015-07-09 16:57:17 -06:00
|
|
|
// The browser process app model ID
|
|
|
|
const char kAppUserModelId[] = "app-user-model-id";
|
|
|
|
|
2017-04-03 18:36:01 -06:00
|
|
|
// The application path
|
|
|
|
const char kAppPath[] = "app-path";
|
|
|
|
|
2015-11-12 22:58:31 -07:00
|
|
|
// The command line switch versions of the options.
|
2018-04-17 19:55:30 -06:00
|
|
|
const char kScrollBounce[] = "scroll-bounce";
|
2015-11-12 22:58:31 -07:00
|
|
|
|
2017-03-15 03:51:21 -06:00
|
|
|
// Command switch passed to renderer process to control nodeIntegration.
|
2018-04-17 19:55:30 -06:00
|
|
|
const char kNodeIntegrationInWorker[] = "node-integration-in-worker";
|
2017-03-15 03:51:21 -06:00
|
|
|
|
2015-12-16 03:06:38 -07:00
|
|
|
// Widevine options
|
|
|
|
// Path to Widevine CDM binaries.
|
|
|
|
const char kWidevineCdmPath[] = "widevine-cdm-path";
|
|
|
|
// Widevine CDM version.
|
|
|
|
const char kWidevineCdmVersion[] = "widevine-cdm-version";
|
|
|
|
|
2018-08-14 15:07:53 -06:00
|
|
|
// Forces the maximum disk space to be used by the disk cache, in bytes.
|
|
|
|
const char kDiskCacheSize[] = "disk-cache-size";
|
|
|
|
|
2018-08-23 03:55:13 -06:00
|
|
|
// Ignore the limit of 6 connections per host.
|
|
|
|
const char kIgnoreConnectionsLimit[] = "ignore-connections-limit";
|
|
|
|
|
2018-10-04 12:08:56 -06:00
|
|
|
// Whitelist containing servers for which Integrated Authentication is enabled.
|
|
|
|
const char kAuthServerWhitelist[] = "auth-server-whitelist";
|
|
|
|
|
|
|
|
// Whitelist containing servers for which Kerberos delegation is allowed.
|
|
|
|
const char kAuthNegotiateDelegateWhitelist[] =
|
|
|
|
"auth-negotiate-delegate-whitelist";
|
|
|
|
|
2019-05-13 12:28:01 -06:00
|
|
|
// If set, include the port in generated Kerberos SPNs.
|
|
|
|
const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port";
|
|
|
|
|
2020-06-02 13:58:00 -06:00
|
|
|
// If set, NTLM v2 is disabled for POSIX platforms.
|
|
|
|
const char kDisableNTLMv2[] = "disable-ntlm-v2";
|
|
|
|
|
2013-04-12 01:04:46 -06:00
|
|
|
} // namespace switches
|
|
|
|
|
2019-06-19 15:23:04 -06:00
|
|
|
} // namespace electron
|