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