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 kBackgroundPage[] = "background.page"; | 19 const char kBackgroundPage[] = "background.page"; |
20 const char kBackgroundPageLegacy[] = "background_page"; | 20 const char kBackgroundPageLegacy[] = "background_page"; |
21 const char kBackgroundScripts[] = "background.scripts"; | 21 const char kBackgroundScripts[] = "background.scripts"; |
22 const char kBackgroundPersistent[] = "background.persistent"; | 22 const char kBackgroundPersistent[] = "background.persistent"; |
23 const char kBrowserAction[] = "browser_action"; | 23 const char kBrowserAction[] = "browser_action"; |
24 const char kChromeURLOverrides[] = "chrome_url_overrides"; | 24 const char kChromeURLOverrides[] = "chrome_url_overrides"; |
25 const char kCommands[] = "commands"; | |
25 const char kContentScripts[] = "content_scripts"; | 26 const char kContentScripts[] = "content_scripts"; |
26 const char kContentSecurityPolicy[] = "content_security_policy"; | 27 const char kContentSecurityPolicy[] = "content_security_policy"; |
27 const char kConvertedFromUserScript[] = "converted_from_user_script"; | 28 const char kConvertedFromUserScript[] = "converted_from_user_script"; |
28 const char kCss[] = "css"; | 29 const char kCss[] = "css"; |
29 const char kCtrlKey[] = "ctrlKey"; | 30 const char kCtrlKey[] = "ctrlKey"; |
30 const char kCurrentLocale[] = "current_locale"; | 31 const char kCurrentLocale[] = "current_locale"; |
31 const char kDefaultLocale[] = "default_locale"; | 32 const char kDefaultLocale[] = "default_locale"; |
32 const char kDescription[] = "description"; | 33 const char kDescription[] = "description"; |
33 const char kDevToolsPage[] = "devtools_page"; | 34 const char kDevToolsPage[] = "devtools_page"; |
35 const char kEventName[] = "event_name"; | |
34 const char kExcludeGlobs[] = "exclude_globs"; | 36 const char kExcludeGlobs[] = "exclude_globs"; |
35 const char kExcludeMatches[] = "exclude_matches"; | 37 const char kExcludeMatches[] = "exclude_matches"; |
36 const char kFileFilters[] = "file_filters"; | 38 const char kFileFilters[] = "file_filters"; |
37 const char kFileBrowserHandlers[] = "file_browser_handlers"; | 39 const char kFileBrowserHandlers[] = "file_browser_handlers"; |
38 const char kHomepageURL[] = "homepage_url"; | 40 const char kHomepageURL[] = "homepage_url"; |
39 const char kIcons[] = "icons"; | 41 const char kIcons[] = "icons"; |
40 const char kId[] = "id"; | 42 const char kId[] = "id"; |
41 const char kIncognito[] = "incognito"; | 43 const char kIncognito[] = "incognito"; |
42 const char kIncludeGlobs[] = "include_globs"; | 44 const char kIncludeGlobs[] = "include_globs"; |
43 const char kInputComponents[] = "input_components"; | 45 const char kInputComponents[] = "input_components"; |
44 const char kIntents[] = "intents"; | 46 const char kIntents[] = "intents"; |
45 const char kIntentType[] = "type"; | 47 const char kIntentType[] = "type"; |
46 const char kIntentPath[] = "path"; | 48 const char kIntentPath[] = "path"; |
47 const char kIntentTitle[] = "title"; | 49 const char kIntentTitle[] = "title"; |
48 const char kIntentDisposition[] = "disposition"; | 50 const char kIntentDisposition[] = "disposition"; |
49 const char kIsolation[] = "app.isolation"; | 51 const char kIsolation[] = "app.isolation"; |
50 const char kJs[] = "js"; | 52 const char kJs[] = "js"; |
53 const char kKey[] = "key"; | |
51 const char kKeycode[] = "keyCode"; | 54 const char kKeycode[] = "keyCode"; |
52 const char kLanguage[] = "language"; | 55 const char kLanguage[] = "language"; |
53 const char kLaunch[] = "app.launch"; | 56 const char kLaunch[] = "app.launch"; |
54 const char kLaunchContainer[] = "app.launch.container"; | 57 const char kLaunchContainer[] = "app.launch.container"; |
55 const char kLaunchHeight[] = "app.launch.height"; | 58 const char kLaunchHeight[] = "app.launch.height"; |
56 const char kLaunchLocalPath[] = "app.launch.local_path"; | 59 const char kLaunchLocalPath[] = "app.launch.local_path"; |
57 const char kLaunchWebURL[] = "app.launch.web_url"; | 60 const char kLaunchWebURL[] = "app.launch.web_url"; |
58 const char kLaunchWidth[] = "app.launch.width"; | 61 const char kLaunchWidth[] = "app.launch.width"; |
59 const char kLayouts[] = "layouts"; | 62 const char kLayouts[] = "layouts"; |
60 const char kManifestVersion[] = "manifest_version"; | 63 const char kManifestVersion[] = "manifest_version"; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 const char kTtsVoicesLang[] = "lang"; | 112 const char kTtsVoicesLang[] = "lang"; |
110 const char kTtsVoicesVoiceName[] = "voice_name"; | 113 const char kTtsVoicesVoiceName[] = "voice_name"; |
111 const char kType[] = "type"; | 114 const char kType[] = "type"; |
112 const char kUpdateURL[] = "update_url"; | 115 const char kUpdateURL[] = "update_url"; |
113 const char kVersion[] = "version"; | 116 const char kVersion[] = "version"; |
114 const char kWebAccessibleResources[] = "web_accessible_resources"; | 117 const char kWebAccessibleResources[] = "web_accessible_resources"; |
115 const char kWebURLs[] = "app.urls"; | 118 const char kWebURLs[] = "app.urls"; |
116 } // namespace extension_manifest_keys | 119 } // namespace extension_manifest_keys |
117 | 120 |
118 namespace extension_manifest_values { | 121 namespace extension_manifest_values { |
122 const char kBrowserActionKeybindingEvent[] = "browserAction"; | |
119 const char kIncognitoSplit[] = "split"; | 123 const char kIncognitoSplit[] = "split"; |
120 const char kIncognitoSpanning[] = "spanning"; | 124 const char kIncognitoSpanning[] = "spanning"; |
121 const char kIntentDispositionWindow[] = "window"; | 125 const char kIntentDispositionWindow[] = "window"; |
122 const char kIntentDispositionInline[] = "inline"; | 126 const char kIntentDispositionInline[] = "inline"; |
123 const char kIsolatedStorage[] = "storage"; | 127 const char kIsolatedStorage[] = "storage"; |
124 const char kRunAtDocumentStart[] = "document_start"; | 128 const char kRunAtDocumentStart[] = "document_start"; |
125 const char kRunAtDocumentEnd[] = "document_end"; | 129 const char kRunAtDocumentEnd[] = "document_end"; |
126 const char kRunAtDocumentIdle[] = "document_idle"; | 130 const char kRunAtDocumentIdle[] = "document_idle"; |
131 const char kPageActionKeybindingEvent[] = "pageAction"; | |
127 const char kPageActionTypeTab[] = "tab"; | 132 const char kPageActionTypeTab[] = "tab"; |
128 const char kPageActionTypePermanent[] = "permanent"; | 133 const char kPageActionTypePermanent[] = "permanent"; |
129 const char kLaunchContainerPanel[] = "panel"; | 134 const char kLaunchContainerPanel[] = "panel"; |
130 const char kLaunchContainerShell[] = "shell"; | 135 const char kLaunchContainerShell[] = "shell"; |
131 const char kLaunchContainerTab[] = "tab"; | 136 const char kLaunchContainerTab[] = "tab"; |
132 const char kLaunchContainerWindow[] = "window"; | 137 const char kLaunchContainerWindow[] = "window"; |
133 } // namespace extension_manifest_values | 138 } // namespace extension_manifest_values |
134 | 139 |
135 // Extension-related error messages. Some of these are simple patterns, where a | 140 // Extension-related error messages. Some of these are simple patterns, where a |
136 // '*' is replaced at runtime with a specific value. This is used instead of | 141 // '*' is replaced at runtime with a specific value. This is used instead of |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 "absolute HTTPS URL for the background page."; | 187 "absolute HTTPS URL for the background page."; |
183 const char kInvalidBackgroundPersistent[] = | 188 const char kInvalidBackgroundPersistent[] = |
184 "Invalid value for 'background.persistent'."; | 189 "Invalid value for 'background.persistent'."; |
185 const char kInvalidBackgroundPersistentNoPage[] = | 190 const char kInvalidBackgroundPersistentNoPage[] = |
186 "Must specify one of background.page or background.scripts to use" | 191 "Must specify one of background.page or background.scripts to use" |
187 " background.persistent."; | 192 " background.persistent."; |
188 const char kInvalidBrowserAction[] = | 193 const char kInvalidBrowserAction[] = |
189 "Invalid value for 'browser_action'."; | 194 "Invalid value for 'browser_action'."; |
190 const char kInvalidChromeURLOverrides[] = | 195 const char kInvalidChromeURLOverrides[] = |
191 "Invalid value for 'chrome_url_overrides'."; | 196 "Invalid value for 'chrome_url_overrides'."; |
197 const char kInvalidCommandsKey[] = | |
198 "Invalid commands key."; | |
Matt Perry
2012/02/21 23:13:39
nit: be consistent with the other errors: "Invalid
| |
192 const char kInvalidContentScript[] = | 199 const char kInvalidContentScript[] = |
193 "Invalid value for 'content_scripts[*]'."; | 200 "Invalid value for 'content_scripts[*]'."; |
194 const char kInvalidContentSecurityPolicy[] = | 201 const char kInvalidContentSecurityPolicy[] = |
195 "Invalid value for 'content_security_policy'."; | 202 "Invalid value for 'content_security_policy'."; |
196 const char kInvalidContentScriptsList[] = | 203 const char kInvalidContentScriptsList[] = |
197 "Invalid value for 'content_scripts'."; | 204 "Invalid value for 'content_scripts'."; |
198 const char kInvalidCss[] = | 205 const char kInvalidCss[] = |
199 "Invalid value for 'content_scripts[*].css[*]'."; | 206 "Invalid value for 'content_scripts[*].css[*]'."; |
200 const char kInvalidCssList[] = | 207 const char kInvalidCssList[] = |
201 "Required value 'content_scripts[*].css' is invalid."; | 208 "Required value 'content_scripts[*].css' is invalid."; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 const char kInvalidIsolation[] = | 270 const char kInvalidIsolation[] = |
264 "Invalid value for 'app.isolation'."; | 271 "Invalid value for 'app.isolation'."; |
265 const char kInvalidIsolationValue[] = | 272 const char kInvalidIsolationValue[] = |
266 "Invalid value for 'app.isolation[*]'."; | 273 "Invalid value for 'app.isolation[*]'."; |
267 const char kInvalidJs[] = | 274 const char kInvalidJs[] = |
268 "Invalid value for 'content_scripts[*].js[*]'."; | 275 "Invalid value for 'content_scripts[*].js[*]'."; |
269 const char kInvalidJsList[] = | 276 const char kInvalidJsList[] = |
270 "Required value 'content_scripts[*].js' is invalid."; | 277 "Required value 'content_scripts[*].js' is invalid."; |
271 const char kInvalidKey[] = | 278 const char kInvalidKey[] = |
272 "Value 'key' is missing or invalid."; | 279 "Value 'key' is missing or invalid."; |
280 const char kInvalidKeyBinding[] = | |
281 "Invalid value for 'commands[*].key':"; | |
282 const char kInvalidKeyBindingDescription[] = | |
283 "Invalid value for 'commands[*].description'."; | |
284 const char kInvalidKeyBindingDictionary[] = | |
285 "Contents of 'commands[*]' invalid."; | |
273 const char kInvalidLaunchContainer[] = | 286 const char kInvalidLaunchContainer[] = |
274 "Invalid value for 'app.launch.container'."; | 287 "Invalid value for 'app.launch.container'."; |
275 const char kInvalidLaunchContainerForNonPlatform[] = | 288 const char kInvalidLaunchContainerForNonPlatform[] = |
276 "'app.launch.container' = 'shell' can only be used with platform_app."; | 289 "'app.launch.container' = 'shell' can only be used with platform_app."; |
277 const char kInvalidLaunchContainerForPlatform[] = | 290 const char kInvalidLaunchContainerForPlatform[] = |
278 "platform_app requires 'app.launch.container' == 'shell'."; | 291 "platform_app requires 'app.launch.container' == 'shell'."; |
279 const char kInvalidLaunchHeight[] = | 292 const char kInvalidLaunchHeight[] = |
280 "Invalid value for 'app.launch.height'."; | 293 "Invalid value for 'app.launch.height'."; |
281 const char kInvalidLaunchHeightContainer[] = | 294 const char kInvalidLaunchHeightContainer[] = |
282 "Invalid container type for 'app.launch.height'."; | 295 "Invalid container type for 'app.launch.height'."; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; | 536 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; |
524 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; | 537 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; |
525 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; | 538 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; |
526 #if defined(OS_CHROMEOS) | 539 #if defined(OS_CHROMEOS) |
527 const char kAccessExtensionPath[] = | 540 const char kAccessExtensionPath[] = |
528 "/usr/share/chromeos-assets/accessibility/extensions"; | 541 "/usr/share/chromeos-assets/accessibility/extensions"; |
529 const char kChromeVoxDirectoryName[] = "access_chromevox"; | 542 const char kChromeVoxDirectoryName[] = "access_chromevox"; |
530 #endif | 543 #endif |
531 | 544 |
532 } | 545 } |
OLD | NEW |