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