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