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