OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/extensions/extension_constants.h" | 5 #include "chrome/common/extensions/extension_constants.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 | 12 |
13 namespace extension_manifest_keys { | 13 namespace extension_manifest_keys { |
14 | 14 |
15 const char kAllFrames[] = "all_frames"; | 15 const char kAllFrames[] = "all_frames"; |
16 const char kAltKey[] = "altKey"; | 16 const char kAltKey[] = "altKey"; |
17 const char kApp[] = "app"; | 17 const char kApp[] = "app"; |
18 const char kBackground[] = "background"; | 18 const char kBackground[] = "background"; |
| 19 const char kBackgroundAllowJsAccess[] = "background.allow_js_access"; |
19 const char kBackgroundPage[] = "background.page"; | 20 const char kBackgroundPage[] = "background.page"; |
20 const char kBackgroundPageLegacy[] = "background_page"; | 21 const char kBackgroundPageLegacy[] = "background_page"; |
| 22 const char kBackgroundPersistent[] = "background.persistent"; |
21 const char kBackgroundScripts[] = "background.scripts"; | 23 const char kBackgroundScripts[] = "background.scripts"; |
22 const char kBackgroundPersistent[] = "background.persistent"; | |
23 const char kBrowserAction[] = "browser_action"; | 24 const char kBrowserAction[] = "browser_action"; |
24 const char kChromeURLOverrides[] = "chrome_url_overrides"; | 25 const char kChromeURLOverrides[] = "chrome_url_overrides"; |
25 const char kCommands[] = "commands"; | 26 const char kCommands[] = "commands"; |
26 const char kContentScripts[] = "content_scripts"; | 27 const char kContentScripts[] = "content_scripts"; |
27 const char kContentSecurityPolicy[] = "content_security_policy"; | 28 const char kContentSecurityPolicy[] = "content_security_policy"; |
28 const char kConvertedFromUserScript[] = "converted_from_user_script"; | 29 const char kConvertedFromUserScript[] = "converted_from_user_script"; |
29 const char kCss[] = "css"; | 30 const char kCss[] = "css"; |
30 const char kCtrlKey[] = "ctrlKey"; | 31 const char kCtrlKey[] = "ctrlKey"; |
31 const char kCurrentLocale[] = "current_locale"; | 32 const char kCurrentLocale[] = "current_locale"; |
32 const char kDefaultLocale[] = "default_locale"; | 33 const char kDefaultLocale[] = "default_locale"; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const char kExperimentalFlagRequired[] = | 169 const char kExperimentalFlagRequired[] = |
169 "Loading extensions with 'experimental' permission is turned off by " | 170 "Loading extensions with 'experimental' permission is turned off by " |
170 "default. You can enable 'Experimental Extension APIs' " | 171 "default. You can enable 'Experimental Extension APIs' " |
171 "by visiting chrome://flags."; | 172 "by visiting chrome://flags."; |
172 const char kFeatureNotAllowed[] = | 173 const char kFeatureNotAllowed[] = |
173 "Feature '*' is not allowed in this type of manifest."; | 174 "Feature '*' is not allowed in this type of manifest."; |
174 const char kInvalidAllFrames[] = | 175 const char kInvalidAllFrames[] = |
175 "Invalid value for 'content_scripts[*].all_frames'."; | 176 "Invalid value for 'content_scripts[*].all_frames'."; |
176 const char kInvalidBackground[] = | 177 const char kInvalidBackground[] = |
177 "Invalid value for 'background_page'."; | 178 "Invalid value for 'background_page'."; |
| 179 const char kInvalidBackgroundAllowJsAccess[] = |
| 180 "Invalid value for 'background.allow_js_access'."; |
| 181 const char kInvalidBackgroundAllowJsAccessNoPage[] = |
| 182 "Must specify one of background.page or background.scripts to use" |
| 183 " background.allow_js_access."; |
178 const char kInvalidBackgroundCombination[] = | 184 const char kInvalidBackgroundCombination[] = |
179 "The background.page and background.scripts properties cannot be used at " | 185 "The background.page and background.scripts properties cannot be used at " |
180 "the same time."; | 186 "the same time."; |
181 const char kInvalidBackgroundScript[] = | 187 const char kInvalidBackgroundScript[] = |
182 "Invalid value for 'background.scripts[*]'."; | 188 "Invalid value for 'background.scripts[*]'."; |
183 const char kInvalidBackgroundScripts[] = | 189 const char kInvalidBackgroundScripts[] = |
184 "Invalid value for 'background.scripts'."; | 190 "Invalid value for 'background.scripts'."; |
185 const char kInvalidBackgroundInHostedApp[] = | 191 const char kInvalidBackgroundInHostedApp[] = |
186 "Invalid value for 'background_page'. Hosted apps must specify an " | 192 "Invalid value for 'background_page'. Hosted apps must specify an " |
187 "absolute HTTPS URL for the background page."; | 193 "absolute HTTPS URL for the background page."; |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; | 542 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; |
537 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; | 543 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; |
538 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; | 544 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; |
539 #if defined(OS_CHROMEOS) | 545 #if defined(OS_CHROMEOS) |
540 const char kAccessExtensionPath[] = | 546 const char kAccessExtensionPath[] = |
541 "/usr/share/chromeos-assets/accessibility/extensions"; | 547 "/usr/share/chromeos-assets/accessibility/extensions"; |
542 const char kChromeVoxDirectoryName[] = "access_chromevox"; | 548 const char kChromeVoxDirectoryName[] = "access_chromevox"; |
543 #endif | 549 #endif |
544 | 550 |
545 } | 551 } |
OLD | NEW |