• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "extensions/common/switches.h"
6 
7 namespace extensions {
8 
9 namespace switches {
10 
11 // Allows non-https URL for background_page for hosted apps.
12 const char kAllowHTTPBackgroundPage[] = "allow-http-background-page";
13 
14 // Allows the browser to load extensions that lack a modern manifest when that
15 // would otherwise be forbidden.
16 const char kAllowLegacyExtensionManifests[] =
17     "allow-legacy-extension-manifests";
18 
19 // Enables the <appview> tag in platform apps.
20 const char kAppView[] = "app-view";
21 
22 // Enables extension options to be embedded in chrome://extensions rather than
23 // a new tab.
24 const char kEmbeddedExtensionOptions[] = "embedded-extension-options";
25 
26 // Show apps windows after the first paint. Windows will be shown significantly
27 // later for heavy apps loading resources synchronously but it will be
28 // insignificant for apps that load most of their resources asynchronously.
29 const char kEnableAppsShowOnFirstPaint[] = "enable-apps-show-on-first-paint";
30 
31 // Hack so that feature switch can work with about_flags. See
32 // kEnableScriptsRequireAction.
33 const char kEnableAppView[] = "enable-app-view";
34 
35 // Enables the <window-controls> tag in platform apps.
36 const char kEnableAppWindowControls[] = "enable-app-window-controls";
37 
38 // Hack so that feature switch can work with about_flags. See
39 // kEnableScriptsRequireAction.
40 const char kEnableEmbeddedExtensionOptions[] =
41     "enable-embedded-extension-options";
42 
43 // Enables extension APIs that are in development.
44 const char kEnableExperimentalExtensionApis[] =
45     "enable-experimental-extension-apis";
46 
47 // Hack so that feature switch can work with about_flags. See
48 // kEnableScriptsRequireAction.
49 const char kEnableExtensionActionRedesign[] =
50     "enable-extension-action-redesign";
51 
52 // Hack so that feature switch can work with about_flags. See
53 // kEnableScriptsRequireAction.
54 const char kEnableMimeHandlerView[] = "enable-mime-handler-view";
55 
56 // Enables extensions to hide bookmarks UI elements.
57 const char kEnableOverrideBookmarksUI[] = "enable-override-bookmarks-ui";
58 
59 // Allows the ErrorConsole to collect runtime and manifest errors, and display
60 // them in the chrome:extensions page.
61 const char kErrorConsole[] = "error-console";
62 
63 // Whether to switch to extension action redesign mode (experimental).
64 const char kExtensionActionRedesign[] = "extension-action-redesign";
65 
66 // Marks a renderer as extension process.
67 const char kExtensionProcess[] = "extension-process";
68 
69 // Enables extensions running scripts on chrome:// URLs.
70 // Extensions still need to explicitly request access to chrome:// URLs in the
71 // manifest.
72 const char kExtensionsOnChromeURLs[] = "extensions-on-chrome-urls";
73 
74 // Whether to force developer mode extensions highlighting.
75 const char kForceDevModeHighlighting[] = "force-dev-mode-highlighting";
76 
77 // Whether or not mime handler view guests are enabled.
78 const char kMimeHandlerView[] = "mime-handler-view";
79 
80 // Notify the user and require consent for extensions running scripts.
81 // Appending --scripts-require-action=1 has the same effect as
82 // --enable-scripts-require-action (see below).
83 const char kScriptsRequireAction[] = "scripts-require-action";
84 // FeatureSwitch and about_flags don't play nice. Feature switch expects either
85 // --enable-<feature> or --<feature>=1, but about_flags expects the command
86 // line argument to enable it (or a selection). Hack this in, so enabling it
87 // in about_flags enables the feature. Appending this flag has the same effect
88 // as --scripts-require-action=1.
89 const char kEnableScriptsRequireAction[] = "enable-scripts-require-action";
90 
91 // Makes component extensions appear in chrome://settings/extensions.
92 const char kShowComponentExtensionOptions[] =
93     "show-component-extension-options";
94 
95 // Adds the given extension ID to all the permission whitelists.
96 const char kWhitelistedExtensionID[] = "whitelisted-extension-id";
97 
98 }  // namespace switches
99 
100 }  // namespace extensions
101