Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / extensions / common / manifest_constants.cc
blobce02109d7480d589c765ab0413f4b369888a75f5
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.
5 #include "extensions/common/manifest_constants.h"
7 namespace extensions {
9 namespace manifest_keys {
11 const char kAboutPage[] = "about_page";
12 const char kAllFrames[] = "all_frames";
13 const char kAltKey[] = "altKey";
14 const char kApp[] = "app";
15 const char kAutomation[] = "automation";
16 const char kBackgroundAllowJsAccess[] = "background.allow_js_access";
17 const char kBackgroundPage[] = "background.page";
18 const char kBackgroundPageLegacy[] = "background_page";
19 const char kBackgroundPersistent[] = "background.persistent";
20 const char kBackgroundScripts[] = "background.scripts";
21 const char kBluetooth[] = "bluetooth";
22 const char kBookmarkUI[] = "bookmarks_ui";
23 const char kBrowserAction[] = "browser_action";
24 const char kChromeURLOverrides[] = "chrome_url_overrides";
25 const char kCommands[] = "commands";
26 const char kContentPack[] = "content_pack";
27 const char kContentPackSites[] = "sites";
28 const char kContentScripts[] = "content_scripts";
29 const char kContentSecurityPolicy[] = "content_security_policy";
30 const char kConvertedFromUserScript[] = "converted_from_user_script";
31 const char kCss[] = "css";
32 const char kCtrlKey[] = "ctrlKey";
33 const char kCurrentLocale[] = "current_locale";
34 const char kDefaultLocale[] = "default_locale";
35 const char kDescription[] = "description";
36 const char kDevToolsPage[] = "devtools_page";
37 const char kDisplayInLauncher[] = "display_in_launcher";
38 const char kDisplayInNewTabPage[] = "display_in_new_tab_page";
39 const char kEventName[] = "event_name";
40 const char kExcludeGlobs[] = "exclude_globs";
41 const char kExcludeMatches[] = "exclude_matches";
42 const char kExport[] = "export";
43 const char kExternallyConnectable[] = "externally_connectable";
44 const char kFileAccessList[] = "file_access";
45 const char kFileFilters[] = "file_filters";
46 const char kFileBrowserHandlers[] = "file_browser_handlers";
47 const char kFileHandlers[] = "file_handlers";
48 const char kFileHandlerExtensions[] = "extensions";
49 const char kFileHandlerTypes[] = "types";
50 const char kGlobal[] = "global";
51 const char kHideBookmarkButton[] = "hide_bookmark_button";
52 const char kHomepageURL[] = "homepage_url";
53 const char kIcons[] = "icons";
54 const char kId[] = "id";
55 const char kImeOptionsPage[] = "options_page";
56 const char kImport[] = "import";
57 const char kIncognito[] = "incognito";
58 const char kIncludeGlobs[] = "include_globs";
59 const char kIndicator[] = "indicator";
60 const char kInputComponents[] = "input_components";
61 const char kInputView[] = "input_view";
62 const char kIsolation[] = "app.isolation";
63 const char kJs[] = "js";
64 const char kKey[] = "key";
65 const char kKeycode[] = "keyCode";
66 const char kKioskEnabled[] = "kiosk_enabled";
67 const char kKioskOnly[] = "kiosk_only";
68 const char kKioskMode[] = "kiosk_mode";
69 const char kLanguage[] = "language";
70 const char kLaunch[] = "app.launch";
71 const char kLaunchContainer[] = "app.launch.container";
72 const char kLauncherPage[] = "launcher_page";
73 const char kLauncherPagePage[] = "launcher_page.page";
74 const char kLaunchHeight[] = "app.launch.height";
75 const char kLaunchLocalPath[] = "app.launch.local_path";
76 const char kLaunchWebURL[] = "app.launch.web_url";
77 const char kLaunchWidth[] = "app.launch.width";
78 const char kLayouts[] = "layouts";
79 const char kManifestVersion[] = "manifest_version";
80 const char kMatchAboutBlank[] = "match_about_blank";
81 const char kMatches[] = "matches";
82 const char kMinimumChromeVersion[] = "minimum_chrome_version";
83 const char kMinimumVersion[] = "minimum_version";
84 const char kMIMETypes[] = "mime_types";
85 const char kMimeTypesHandler[] = "mime_types_handler";
86 const char kName[] = "name";
87 const char kNaClArch[] = "nacl_arch";
88 const char kNaClModules[] = "nacl_modules";
89 const char kNaClModulesMIMEType[] = "mime_type";
90 const char kNaClModulesPath[] = "path";
91 const char kOAuth2[] = "oauth2";
92 const char kOAuth2AutoApprove[] = "oauth2.auto_approve";
93 const char kOAuth2ClientId[] = "oauth2.client_id";
94 const char kOAuth2Scopes[] = "oauth2.scopes";
95 const char kOfflineEnabled[] = "offline_enabled";
96 const char kOmnibox[] = "omnibox";
97 const char kOmniboxKeyword[] = "omnibox.keyword";
98 const char kOptionalPermissions[] = "optional_permissions";
99 const char kOptionsPage[] = "options_page";
100 const char kOptionsUI[] = "options_ui";
101 const char kOverrideHomepage[] = "chrome_settings_overrides.homepage";
102 const char kOverrideSearchProvider[] =
103 "chrome_settings_overrides.search_provider";
104 const char kOverrideStartupPage[] = "chrome_settings_overrides.startup_pages";
105 const char kPageAction[] = "page_action";
106 const char kPageActionDefaultIcon[] = "default_icon";
107 const char kPageActionDefaultPopup[] = "default_popup";
108 const char kPageActionDefaultTitle[] = "default_title";
109 const char kPageActionIcons[] = "icons";
110 const char kPageActionId[] = "id";
111 const char kPageActionPopup[] = "popup";
112 const char kPageActionPopupPath[] = "path";
113 const char kPermissions[] = "permissions";
114 const char kPlatformAppBackground[] = "app.background";
115 const char kPlatformAppBackgroundPage[] = "app.background.page";
116 const char kPlatformAppBackgroundScripts[] = "app.background.scripts";
117 const char kPlatformAppContentSecurityPolicy[] = "app.content_security_policy";
118 const char kPlatforms[] = "platforms";
119 const char kPlugins[] = "plugins";
120 const char kPluginsPath[] = "path";
121 const char kPluginsPublic[] = "public";
122 const char kPublicKey[] = "key";
123 const char kRemoveButton[] = "remove_button";
124 const char kRequirements[] = "requirements";
125 const char kRunAt[] = "run_at";
126 const char kSandboxedPages[] = "sandbox.pages";
127 const char kSandboxedPagesCSP[] = "sandbox.content_security_policy";
128 const char kScriptBadge[] = "script_badge";
129 const char kSettingsOverride[] = "chrome_settings_overrides";
130 const char kSettingsOverrideAlternateUrls[] =
131 "chrome_settings_overrides.search_provider.alternate_urls";
132 const char kShiftKey[] = "shiftKey";
133 const char kShortcutKey[] = "shortcutKey";
134 const char kShortName[] = "short_name";
135 const char kSignature[] = "signature";
136 const char kSockets[] = "sockets";
137 const char kSpellcheck[] = "spellcheck";
138 const char kSpellcheckDictionaryFormat[] = "dictionary_format";
139 const char kSpellcheckDictionaryLanguage[] = "dictionary_language";
140 const char kSpellcheckDictionaryLocale[] = "dictionary_locale";
141 const char kSpellcheckDictionaryPath[] = "dictionary_path";
142 const char kStorageManagedSchema[] = "storage.managed_schema";
143 const char kSubPackagePath[] = "sub_package_path";
144 const char kSuggestedKey[] = "suggested_key";
145 const char kSynthesizeExtensionAction[] = "_synthesize_extension_action";
146 const char kSystemIndicator[] = "system_indicator";
147 const char kTheme[] = "theme";
148 const char kThemeColors[] = "colors";
149 const char kThemeDisplayProperties[] = "properties";
150 const char kThemeImages[] = "images";
151 const char kThemeTints[] = "tints";
152 const char kTtsEngine[] = "tts_engine";
153 const char kTtsGenderFemale[] = "female";
154 const char kTtsGenderMale[] = "male";
155 const char kTtsVoices[] = "voices";
156 const char kTtsVoicesEventTypeEnd[] = "end";
157 const char kTtsVoicesEventTypeError[] = "error";
158 const char kTtsVoicesEventTypeMarker[] = "marker";
159 const char kTtsVoicesEventTypeSentence[] = "sentence";
160 const char kTtsVoicesEventTypeStart[] = "start";
161 const char kTtsVoicesEventTypeWord[] = "word";
162 const char kTtsVoicesEventTypes[] = "event_types";
163 const char kTtsVoicesGender[] = "gender";
164 const char kTtsVoicesLang[] = "lang";
165 const char kTtsVoicesRemote[] = "remote";
166 const char kTtsVoicesVoiceName[] = "voice_name";
167 const char kType[] = "type";
168 const char kUIOverride[] = "chrome_ui_overrides";
169 const char kUpdateURL[] = "update_url";
170 const char kUrlHandlers[] = "url_handlers";
171 const char kUrlHandlerTitle[] = "title";
172 const char kVersion[] = "version";
173 const char kWebAccessibleResources[] = "web_accessible_resources";
174 const char kWebURLs[] = "app.urls";
175 const char kWebview[] = "webview";
176 const char kWebviewAccessibleResources[] = "accessible_resources";
177 const char kWebviewName[] = "name";
178 const char kWebviewPartitions[] = "partitions";
179 const char kWhitelist[] = "whitelist";
181 } // namespace manifest_keys
183 namespace manifest_values {
185 const char kBrowserActionCommandEvent[] = "_execute_browser_action";
186 const char kIncognitoSplit[] = "split";
187 const char kIncognitoSpanning[] = "spanning";
188 const char kIsolatedStorage[] = "storage";
189 const char kKeybindingPlatformChromeOs[] = "chromeos";
190 const char kKeybindingPlatformDefault[] = "default";
191 const char kKeybindingPlatformLinux[] = "linux";
192 const char kKeybindingPlatformMac[] = "mac";
193 const char kKeybindingPlatformWin[] = "windows";
194 const char kKeyAlt[] = "Alt";
195 const char kKeyComma[] = "Comma";
196 const char kKeyCommand[] = "Command";
197 const char kKeyCtrl[] = "Ctrl";
198 const char kKeyDel[] = "Delete";
199 const char kKeyDown[] = "Down";
200 const char kKeyEnd[] = "End";
201 const char kKeyHome[] = "Home";
202 const char kKeyIns[] = "Insert";
203 const char kKeyLeft[] = "Left";
204 const char kKeyMacCtrl[] = "MacCtrl";
205 const char kKeyMediaNextTrack[] = "MediaNextTrack";
206 const char kKeyMediaPlayPause[] = "MediaPlayPause";
207 const char kKeyMediaPrevTrack[] = "MediaPrevTrack";
208 const char kKeyMediaStop[] = "MediaStop";
209 const char kKeyPgDwn[] = "PageDown";
210 const char kKeyPgUp[] = "PageUp";
211 const char kKeyPeriod[] = "Period";
212 const char kKeyRight[] = "Right";
213 const char kKeySearch[] = "Search";
214 const char kKeySeparator[] = "+";
215 const char kKeyShift[] = "Shift";
216 const char kKeySpace[] = "Space";
217 const char kKeyTab[] = "Tab";
218 const char kKeyUp[] = "Up";
219 const char kRunAtDocumentStart[] = "document_start";
220 const char kRunAtDocumentEnd[] = "document_end";
221 const char kRunAtDocumentIdle[] = "document_idle";
222 const char kPageActionCommandEvent[] = "_execute_page_action";
223 const char kPageActionTypeTab[] = "tab";
224 const char kPageActionTypePermanent[] = "permanent";
225 const char kScriptBadgeCommandEvent[] = "_execute_script_badge";
226 const char kLaunchContainerPanel[] = "panel";
227 const char kLaunchContainerTab[] = "tab";
228 const char kLaunchContainerWindow[] = "window";
230 } // namespace manifest_values
232 // Extension-related error messages. Some of these are simple patterns, where a
233 // '*' is replaced at runtime with a specific value. This is used instead of
234 // printf because we want to unit test them and scanf is hard to make
235 // cross-platform.
236 namespace manifest_errors {
238 const char kActiveTabPermissionNotGranted[] =
239 "The 'activeTab' permission is not in effect because this extension has "
240 "not been in invoked.";
241 const char kAllURLOrActiveTabNeeded[] =
242 "Either the '<all_urls>' or 'activeTab' permission is required.";
243 const char kAppsNotEnabled[] =
244 "Apps are not enabled.";
245 const char kBackgroundPermissionNeeded[] =
246 "Hosted apps that use 'background_page' must have the 'background' "
247 "permission.";
248 const char kBackgroundRequiredForPlatformApps[] =
249 "Packaged apps must have a background page or background scripts.";
250 const char kCannotAccessChromeUrl[] = "Cannot access a chrome:// URL";
251 const char kCannotAccessExtensionUrl[] =
252 "Cannot access a chrome-extension:// URL of different extension";
253 const char kCannotAccessPage[] =
254 "Cannot access contents of url \"*\". "
255 "Extension manifest must request permission to access this host.";
256 const char kCannotChangeExtensionID[] =
257 "Installed extensions cannot change their IDs.";
258 const char kCannotClaimAllHostsInExtent[] =
259 "Cannot claim all hosts ('*') in an extent.";
260 const char kCannotClaimAllURLsInExtent[] =
261 "Cannot claim all URLs in an extent.";
262 const char kCannotScriptGallery[] =
263 "The extensions gallery cannot be scripted.";
264 const char kCannotScriptSigninPage[] =
265 "The sign-in page cannot be scripted.";
266 const char kChromeVersionTooLow[] =
267 "This extension requires * version * or greater.";
268 const char kDisabledByPolicy[] =
269 "This extension has been disabled by your administrator.";
270 const char kExpectString[] = "Expect string value.";
271 const char kExperimentalFlagRequired[] =
272 "Loading extensions with 'experimental' permission is turned off by "
273 "default. You can enable 'Experimental Extension APIs' "
274 "by visiting chrome://flags.";
275 const char kInvalidAboutPage[] = "Invalid value for 'about_page'.";
276 const char kInvalidAboutPageExpectRelativePath[] =
277 "Invalid value for 'about_page'. Value must be a relative path.";
278 const char kInvalidAllFrames[] =
279 "Invalid value for 'content_scripts[*].all_frames'.";
280 const char kInvalidBackground[] =
281 "Invalid value for 'background_page'.";
282 const char kInvalidBackgroundAllowJsAccess[] =
283 "Invalid value for 'background.allow_js_access'.";
284 const char kInvalidBackgroundCombination[] =
285 "The background.page and background.scripts properties cannot be used at "
286 "the same time.";
287 const char kInvalidBackgroundScript[] =
288 "Invalid value for 'background.scripts[*]'.";
289 const char kInvalidBackgroundScripts[] =
290 "Invalid value for 'background.scripts'.";
291 const char kInvalidBackgroundInHostedApp[] =
292 "Invalid value for 'background_page'. Hosted apps must specify an "
293 "absolute HTTPS URL for the background page.";
294 const char kInvalidBackgroundPersistent[] =
295 "Invalid value for 'background.persistent'.";
296 const char kInvalidBackgroundPersistentNoPage[] =
297 "Must specify one of background.page or background.scripts to use"
298 " background.persistent.";
299 const char kInvalidBrowserAction[] =
300 "Invalid value for 'browser_action'.";
301 const char kInvalidChromeURLOverrides[] =
302 "Invalid value for 'chrome_url_overrides'.";
303 const char kInvalidCommandsKey[] =
304 "Invalid value for 'commands'.";
305 const char kInvalidContentPack[] =
306 "Invalid value for 'content_pack'.";
307 const char kInvalidContentPackSites[] =
308 "Invalid value for Content Pack sites - files must be strings.";
309 const char kInvalidContentScript[] =
310 "Invalid value for 'content_scripts[*]'.";
311 const char kInvalidContentSecurityPolicy[] =
312 "Invalid value for 'content_security_policy'.";
313 const char kInvalidContentScriptsList[] =
314 "Invalid value for 'content_scripts'.";
315 const char kInvalidCss[] =
316 "Invalid value for 'content_scripts[*].css[*]'.";
317 const char kInvalidCssList[] =
318 "Required value 'content_scripts[*].css' is invalid.";
319 const char kInvalidDefaultLocale[] =
320 "Invalid value for default locale - locale name must be a string.";
321 const char kInvalidDescription[] =
322 "Invalid value for 'description'.";
323 const char kInvalidDevToolsPage[] =
324 "Invalid value for 'devtools_page'.";
325 const char kInvalidDisplayInLauncher[] =
326 "Invalid value for 'display_in_launcher'.";
327 const char kInvalidDisplayInNewTabPage[] =
328 "Invalid value for 'display_in_new_tab_page'.";
329 const char kInvalidEmptyDictionary[] = "Empty dictionary for '*'.";
330 const char kInvalidExcludeMatch[] =
331 "Invalid value for 'content_scripts[*].exclude_matches[*]': *";
332 const char kInvalidExcludeMatches[] =
333 "Invalid value for 'content_scripts[*].exclude_matches'.";
334 const char kInvalidExport[] =
335 "Invalid value for 'export'.";
336 const char kInvalidExportPermissions[] =
337 "Permissions are not allowed for extensions that export resources.";
338 const char kInvalidExportWhitelist[] =
339 "Invalid value for 'export.whitelist'.";
340 const char kInvalidExportWhitelistString[] =
341 "Invalid value for 'export.whitelist[*]'.";
342 const char kInvalidFileAccessList[] =
343 "Invalid value for 'file_access'.";
344 const char kInvalidFileAccessValue[] =
345 "Invalid value for 'file_access[*]'.";
346 const char kInvalidFileBrowserHandler[] =
347 "Invalid value for 'file_browser_handlers'.";
348 const char kInvalidFileFiltersList[] =
349 "Invalid value for 'file_filters'.";
350 const char kInvalidFileFilterValue[] =
351 "Invalid value for 'file_filters[*]'.";
352 const char kInvalidFileHandlers[] =
353 "Invalid value for 'file_handlers'.";
354 const char kInvalidFileHandlersTooManyTypesAndExtensions[] =
355 "Too many MIME and extension file_handlers have been declared.";
356 const char kInvalidFileHandlerExtension[] =
357 "Invalid value for 'file_handlers[*].extensions'.";
358 const char kInvalidFileHandlerExtensionElement[] =
359 "Invalid value for 'file_handlers[*].extensions[*]'.";
360 const char kInvalidFileHandlerNoTypeOrExtension[] =
361 "'file_handlers[*]' must contain a non-empty 'types' or 'extensions'.";
362 const char kInvalidFileHandlerType[] =
363 "Invalid value for 'file_handlers[*].types'.";
364 const char kInvalidFileHandlerTypeElement[] =
365 "Invalid value for 'file_handlers[*].types[*]'.";
366 const char kInvalidGlob[] =
367 "Invalid value for 'content_scripts[*].*[*]'.";
368 const char kInvalidGlobList[] =
369 "Invalid value for 'content_scripts[*].*'.";
370 const char kInvalidHomepageOverrideURL[] =
371 "Invalid value for overriding homepage url: '[*]'.";
372 const char kInvalidHomepageURL[] =
373 "Invalid value for homepage url: '[*]'.";
374 const char kInvalidIconPath[] =
375 "Invalid value for 'icons[\"*\"]'.";
376 const char kInvalidIcons[] =
377 "Invalid value for 'icons'.";
378 const char kInvalidImport[] =
379 "Invalid value for 'import'.";
380 const char kInvalidImportAndExport[] =
381 "Simultaneous 'import' and 'export' are not allowed.";
382 const char kInvalidImportId[] =
383 "Invalid value for 'import[*].id'.";
384 const char kInvalidImportVersion[] =
385 "Invalid value for 'import[*].minimum_version'.";
386 const char kInvalidIncognitoBehavior[] =
387 "Invalid value for 'incognito'.";
388 const char kInvalidInputComponents[] =
389 "Invalid value for 'input_components'";
390 const char kInvalidInputComponentDescription[] =
391 "Invalid value for 'input_components[*].description";
392 const char kInvalidInputComponentLayoutName[] =
393 "Invalid value for 'input_components[*].layouts[*]";
394 const char kInvalidInputComponentName[] =
395 "Invalid value for 'input_components[*].name";
396 const char kInvalidInputComponentShortcutKey[] =
397 "Invalid value for 'input_components[*].shortcutKey";
398 const char kInvalidInputComponentShortcutKeycode[] =
399 "Invalid value for 'input_components[*].shortcutKey.keyCode";
400 const char kInvalidInputComponentType[] =
401 "Invalid value for 'input_components[*].type";
402 const char kInvalidInputView[] =
403 "Invalid value for 'input_view'.";
404 const char kInvalidIsolation[] =
405 "Invalid value for 'app.isolation'.";
406 const char kInvalidIsolationValue[] =
407 "Invalid value for 'app.isolation[*]'.";
408 const char kInvalidJs[] =
409 "Invalid value for 'content_scripts[*].js[*]'.";
410 const char kInvalidJsList[] =
411 "Required value 'content_scripts[*].js' is invalid.";
412 const char kInvalidKey[] =
413 "Value 'key' is missing or invalid.";
414 const char kInvalidKeyBinding[] =
415 "Invalid value for 'commands[*].*': *.";
416 const char kInvalidKeyBindingDescription[] =
417 "Invalid value for 'commands[*].description'.";
418 const char kInvalidKeyBindingDictionary[] =
419 "Contents of 'commands[*]' invalid.";
420 const char kInvalidKeyBindingMediaKeyWithModifier[] =
421 "Media key cannot have any modifier for 'commands[*].*': *.";
422 const char kInvalidKeyBindingMissingPlatform[] =
423 "Could not find key specification for 'command[*].*': Either specify a key "
424 "for '*', or specify a default key.";
425 const char kInvalidKeyBindingTooMany[] =
426 "Too many shortcuts specified for 'commands': The maximum is *.";
427 const char kInvalidKeyBindingUnknownPlatform[] =
428 "Unknown platform for 'command[*]': *. Valid values are: 'windows', 'mac'"
429 " 'chromeos', 'linux' and 'default'.";
430 const char kInvalidKioskEnabled[] =
431 "Invalid value for 'kiosk_enabled'.";
432 const char kInvalidKioskOnly[] =
433 "Invalid value for 'kiosk_only'.";
434 const char kInvalidKioskOnlyButNotEnabled[] =
435 "The 'kiosk_only' key is set, but 'kiosk_enabled' is not set.";
436 const char kInvalidLauncherPage[] = "Invalid value for 'launcher_page'.";
437 const char kInvalidLauncherPagePage[] =
438 "Invalid value for 'launcher_page.page'.";
439 const char kInvalidLaunchContainer[] =
440 "Invalid value for 'app.launch.container'.";
441 const char kInvalidLaunchValue[] =
442 "Invalid value for '*'.";
443 const char kInvalidLaunchValueContainer[] =
444 "Invalid container type for '*'.";
445 const char kInvalidManifest[] =
446 "Manifest file is invalid.";
447 const char kInvalidManifestVersion[] =
448 "Invalid value for 'manifest_version'. Must be an integer greater than "
449 "zero.";
450 const char kInvalidManifestVersionOld[] =
451 "The 'manifest_version' key must be present and set to * (without quotes). "
452 "See developer.chrome.com/*/manifestVersion.html for details.";
453 const char kInvalidMatch[] =
454 "Invalid value for 'content_scripts[*].matches[*]': *";
455 const char kInvalidMatchAboutBlank[] =
456 "Invalid value for 'content_scripts[*].match_about_blank'.";
457 const char kInvalidMatchCount[] =
458 "Invalid value for 'content_scripts[*].matches'. There must be at least "
459 "one match specified.";
460 const char kInvalidMatches[] =
461 "Required value 'content_scripts[*].matches' is missing or invalid.";
462 const char kInvalidMIMETypes[] =
463 "Invalid value for 'mime_types'";
464 const char kInvalidMimeTypesHandler[] =
465 "Invalid value for 'mime_types'.";
466 const char kInvalidMinimumChromeVersion[] =
467 "Invalid value for 'minimum_chrome_version'.";
468 const char kInvalidName[] =
469 "Required value 'name' is missing or invalid.";
470 const char kInvalidNaClModules[] =
471 "Invalid value for 'nacl_modules'.";
472 const char kInvalidNaClModulesPath[] =
473 "Invalid value for 'nacl_modules[*].path'.";
474 const char kInvalidNaClModulesMIMEType[] =
475 "Invalid value for 'nacl_modules[*].mime_type'.";
476 const char kInvalidOAuth2AutoApprove[] =
477 "Invalid value for 'oauth2.auto_approve'. Value must be true or false.";
478 const char kInvalidOAuth2ClientId[] =
479 "Invalid value for 'oauth2.client_id'.";
480 const char kInvalidOAuth2Scopes[] =
481 "Invalid value for 'oauth2.scopes'.";
482 const char kInvalidOfflineEnabled[] =
483 "Invalid value for 'offline_enabled'.";
484 const char kInvalidOmniboxKeyword[] =
485 "Invalid value for 'omnibox.keyword'.";
486 const char kInvalidOptionsPage[] = "Invalid value for '*'.";
487 const char kInvalidOptionsPageExpectUrlInPackage[] =
488 "Invalid value for 'options_page'. Value must be a relative path.";
489 const char kInvalidOptionsPageInHostedApp[] =
490 "Invalid value for 'options_page'. Hosted apps must specify an "
491 "absolute URL.";
492 const char kInvalidOptionsUIChromeStyle[] =
493 "Invalid value for 'options_ui.chrome_style'.";
494 const char kInvalidOptionsUIOpenInTab[] =
495 "Invalid value for 'options_ui.open_in_tab'.";
496 const char kInvalidPageAction[] =
497 "Invalid value for 'page_action'.";
498 const char kInvalidPageActionDefaultTitle[] =
499 "Invalid value for 'default_title'.";
500 const char kInvalidPageActionIconPath[] =
501 "Invalid value for 'page_action.default_icon'.";
502 const char kInvalidPageActionId[] =
503 "Required value 'id' is missing or invalid.";
504 const char kInvalidPageActionName[] =
505 "Invalid value for 'page_action.name'.";
506 const char kInvalidPageActionOldAndNewKeys[] =
507 "Key \"*\" is deprecated. Key \"*\" has the same meaning. You can not "
508 "use both.";
509 const char kInvalidPageActionPopup[] =
510 "Invalid type for page action popup.";
511 const char kInvalidPageActionPopupPath[] =
512 "Invalid value for page action popup path [*].";
513 const char kInvalidPermissionWithDetail[] =
514 "Invalid value for 'permissions[*]': *.";
515 const char kInvalidPermission[] =
516 "Invalid value for 'permissions[*]'.";
517 const char kInvalidPermissions[] =
518 "Invalid value for 'permissions'.";
519 const char kInvalidPermissionScheme[] =
520 "Invalid scheme for 'permissions[*]'.";
521 const char kInvalidPlugins[] =
522 "Invalid value for 'plugins'.";
523 const char kInvalidPluginsPath[] =
524 "Invalid value for 'plugins[*].path'.";
525 const char kInvalidPluginsPublic[] =
526 "Invalid value for 'plugins[*].public'.";
527 const char kInvalidRequirement[] =
528 "Invalid value for requirement \"*\"";
529 const char kInvalidRequirements[] =
530 "Invalid value for 'requirements'";
531 const char kInvalidRunAt[] =
532 "Invalid value for 'content_scripts[*].run_at'.";
533 const char kInvalidSandboxedPagesList[] =
534 "Invalid value for 'sandbox.pages'.";
535 const char kInvalidSandboxedPage[] =
536 "Invalid value for 'sandbox.pages[*]'.";
537 const char kInvalidSandboxedPagesCSP[] =
538 "Invalid value for 'sandbox.content_security_policy'.";
539 const char kInvalidScriptBadge[] =
540 "Invalid value for 'script_badge'.";
541 const char kInvalidSearchEngineMissingKeys[] =
542 "Missing mandatory parameters for "
543 "'chrome_settings_overrides.search_provider'.";
544 const char kInvalidSearchEngineURL[] =
545 "Invalid URL [*] for 'chrome_settings_overrides.search_provider'.";
546 const char kInvalidShortName[] =
547 "Invalid value for 'short_name'.";
548 const char kInvalidSignature[] =
549 "Value 'signature' is missing or invalid.";
550 const char kInvalidSpellcheck[] =
551 "Invalid value for 'spellcheck'.";
552 const char kInvalidSpellcheckDictionaryFormat[] =
553 "Invalid value for spellcheck dictionary format.";
554 const char kInvalidSpellcheckDictionaryLanguage[] =
555 "Invalid value for spellcheck dictionary language.";
556 const char kInvalidSpellcheckDictionaryLocale[] =
557 "Invalid value for spellcheck dictionary locale.";
558 const char kInvalidSpellcheckDictionaryPath[] =
559 "Invalid value for spellcheck dictionary path.";
560 const char kInvalidStartupOverrideURL[] =
561 "Invalid value for overriding startup URL: '[*]'.";
562 const char kInvalidSystemIndicator[] =
563 "Invalid value for 'system_indicator'.";
564 const char kInvalidTheme[] =
565 "Invalid value for 'theme'.";
566 const char kInvalidThemeColors[] =
567 "Invalid value for theme colors - colors must be integers";
568 const char kInvalidThemeImages[] =
569 "Invalid value for theme images - images must be strings.";
570 const char kInvalidThemeImagesMissing[] =
571 "An image specified in the theme is missing.";
572 const char kInvalidThemeTints[] =
573 "Invalid value for theme images - tints must be decimal numbers.";
574 const char kInvalidTts[] =
575 "Invalid value for 'tts_engine'.";
576 const char kInvalidTtsVoices[] =
577 "Invalid value for 'tts_engine.voices'.";
578 const char kInvalidTtsVoicesEventTypes[] =
579 "Invalid value for 'tts_engine.voices[*].event_types'.";
580 const char kInvalidTtsVoicesGender[] =
581 "Invalid value for 'tts_engine.voices[*].gender'.";
582 const char kInvalidTtsVoicesLang[] =
583 "Invalid value for 'tts_engine.voices[*].lang'.";
584 const char kInvalidTtsVoicesRemote[] =
585 "Invalid value for 'tts_engine.voices[*].remote'.";
586 const char kInvalidTtsVoicesVoiceName[] =
587 "Invalid value for 'tts_engine.voices[*].voice_name'.";
588 const char kInvalidUpdateURL[] =
589 "Invalid value for update url: '[*]'.";
590 const char kInvalidURLHandlers[] =
591 "Invalid value for 'url_handlers'.";
592 const char kInvalidURLHandlerPatternElement[] =
593 "Invalid value for 'url_handlers[*]'.";
594 const char kInvalidURLHandlerTitle[] =
595 "Invalid value for 'url_handlers[*].title'.";
596 const char kInvalidURLHandlerPattern[] =
597 "Invalid value for 'url_handlers[*].matches[*]'.";
598 const char kInvalidURLPatternError[] =
599 "Invalid url pattern '*'";
600 const char kInvalidVersion[] =
601 "Required value 'version' is missing or invalid. It must be between 1-4 "
602 "dot-separated integers each between 0 and 65536.";
603 const char kInvalidWebAccessibleResourcesList[] =
604 "Invalid value for 'web_accessible_resources'.";
605 const char kInvalidWebAccessibleResource[] =
606 "Invalid value for 'web_accessible_resources[*]'.";
607 const char kInvalidWebview[] =
608 "Invalid value for 'webview'.";
609 const char kInvalidWebviewAccessibleResourcesList[] =
610 "Invalid value for'webview.accessible_resources'.";
611 const char kInvalidWebviewAccessibleResource[] =
612 "Invalid value for 'webview.accessible_resources[*]'.";
613 const char kInvalidWebviewPartition[] =
614 "Invalid value for 'webview.partitions[*]'.";
615 const char kInvalidWebviewPartitionName[] =
616 "Invalid value for 'webview.partitions[*].name'.";
617 const char kInvalidWebviewPartitionsList[] =
618 "Invalid value for 'webview.partitions'.";
619 const char kInvalidWebURL[] =
620 "Invalid value for 'app.urls[*]': *";
621 const char kInvalidWebURLs[] =
622 "Invalid value for 'app.urls'.";
623 const char kInvalidZipHash[] =
624 "Required key 'zip_hash' is missing or invalid.";
625 const char kInsecureContentSecurityPolicy[] =
626 "Invalid value for 'content_security_policy': Both 'script-src' and"
627 " 'object-src' directives must be specified (either explicitly, or"
628 " implicitly via 'default-src'), and both must whitelist only secure"
629 " resources. You may include any of the following sources: \"'self'\","
630 " \"'unsafe-eval'\", \"http://127.0.0.1\", \"http://localhost\", or any"
631 " \"https://\" or \"chrome-extension://\" origin. For more information,"
632 " see http://developer.chrome.com/extensions/contentSecurityPolicy.html";
633 const char kKeyIsDeprecatedWithReplacement[] =
634 "Key \"*\" is deprecated. Key \"*\" should be used instead.";
635 const char kLauncherPagePageRequired[] =
636 "The 'launcher_page.page' key is required.";
637 const char kLaunchPathAndExtentAreExclusive[] =
638 "The 'app.launch.local_path' and 'app.urls' keys cannot both be set.";
639 const char kLaunchPathAndURLAreExclusive[] =
640 "The 'app.launch.local_path' and 'app.launch.web_url' keys cannot "
641 "both be set.";
642 const char kLaunchURLRequired[] =
643 "Either 'app.launch.local_path' or 'app.launch.web_url' is required.";
644 const char kLocalesInvalidLocale[] =
645 "Invalid locale file '*': *";
646 const char kLocalesMessagesFileMissing[] =
647 "Messages file is missing for locale.";
648 const char kLocalesNoDefaultLocaleSpecified[] =
649 "Localization used, but default_locale wasn't specified in the manifest.";
650 const char kLocalesNoDefaultMessages[] =
651 "Default locale is defined but default data couldn't be loaded.";
652 const char kLocalesNoValidLocaleNamesListed[] =
653 "No valid locale name could be found in _locales directory.";
654 const char kLocalesTreeMissing[] =
655 "Default locale was specified, but _locales subtree is missing.";
656 const char kManifestParseError[] =
657 "Manifest is not valid JSON.";
658 const char kManifestUnreadable[] =
659 "Manifest file is missing or unreadable.";
660 const char kMissingFile[] =
661 "At least one js or css file is required for 'content_scripts[*]'.";
662 const char kMultipleOverrides[] =
663 "An extension cannot override more than one page.";
664 const char kNoPermissionForMIMETypes[] =
665 "The extension is not allowed to use mime_types key.";
666 const char kNoWildCardsInPaths[] =
667 "Wildcards are not allowed in extent URL pattern paths.";
668 const char kOneUISurfaceOnly[] =
669 "Only one of 'browser_action', 'page_action', and 'app' can be specified.";
670 const char kPermissionMustBeOptional[] =
671 "Permission '*' must be specified in the optional section of the manifest.";
672 const char kPermissionNotAllowed[] =
673 "Access to permission '*' denied.";
674 const char kPermissionNotAllowedInManifest[] =
675 "Permission '*' cannot be specified in the manifest.";
676 const char kPermissionUnknownOrMalformed[] =
677 "Permission '*' is unknown or URL pattern is malformed.";
678 const char kReservedMessageFound[] =
679 "Reserved key * found in message catalog.";
680 const char kScriptBadgeRequiresFlag[] =
681 "The script_badge manifest key is turned off by default. "
682 "You can enable it with the --enable-script-badges command-line flag.";
683 const char kScriptBadgeIconIgnored[] =
684 "default_icon specified in script_badge manifest section will not be used.";
685 const char kScriptBadgeTitleIgnored[] =
686 "default_title specified in script_badge manifest section will not be "
687 "used.";
688 const char kUnrecognizedManifestKey[] = "Unrecognized manifest key '*'.";
689 const char kUnrecognizedManifestProperty[] =
690 "Unrecognized property '*' of manifest key '*'.";
691 const char kWebRequestConflictsWithLazyBackground[] =
692 "The 'webRequest' API cannot be used with event pages.";
693 #if defined(OS_CHROMEOS)
694 const char kIllegalPlugins[] =
695 "Extensions cannot install plugins on Chrome OS";
696 #endif
698 } // namespace manifest_errors
700 } // namespace extensions