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"
9 namespace manifest_keys
{
11 const char kAboutPage
[] = "about_page";
12 const char kAllFrames
[] = "all_frames";
13 const char kAltKey
[] = "altKey";
14 const char kApp
[] = "app";
15 const char kAutomation
[] = "automation";
16 const char kBackgroundAllowJsAccess
[] = "background.allow_js_access";
17 const char kBackgroundPage
[] = "background.page";
18 const char kBackgroundPageLegacy
[] = "background_page";
19 const char kBackgroundPersistent
[] = "background.persistent";
20 const char kBackgroundScripts
[] = "background.scripts";
21 const char kBluetooth
[] = "bluetooth";
22 const char kBookmarkUI
[] = "bookmarks_ui";
23 const char kBrowserAction
[] = "browser_action";
24 const char kChromeURLOverrides
[] = "chrome_url_overrides";
25 const char kCommands
[] = "commands";
26 const char kContentPack
[] = "content_pack";
27 const char kContentPackSites
[] = "sites";
28 const char kContentScripts
[] = "content_scripts";
29 const char kContentSecurityPolicy
[] = "content_security_policy";
30 const char kConvertedFromUserScript
[] = "converted_from_user_script";
31 const char kCss
[] = "css";
32 const char kCtrlKey
[] = "ctrlKey";
33 const char kCurrentLocale
[] = "current_locale";
34 const char kDefaultLocale
[] = "default_locale";
35 const char kDescription
[] = "description";
36 const char kDevToolsPage
[] = "devtools_page";
37 const char kDisplayInLauncher
[] = "display_in_launcher";
38 const char kDisplayInNewTabPage
[] = "display_in_new_tab_page";
39 const char kEventName
[] = "event_name";
40 const char kExcludeGlobs
[] = "exclude_globs";
41 const char kExcludeMatches
[] = "exclude_matches";
42 const char kExport
[] = "export";
43 const char kExternallyConnectable
[] = "externally_connectable";
44 const char kFileAccessList
[] = "file_access";
45 const char kFileFilters
[] = "file_filters";
46 const char kFileBrowserHandlers
[] = "file_browser_handlers";
47 const char kFileHandlers
[] = "file_handlers";
48 const char kFileHandlerExtensions
[] = "extensions";
49 const char kFileHandlerTypes
[] = "types";
50 const char kGlobal
[] = "global";
51 const char kHideBookmarkButton
[] = "hide_bookmark_button";
52 const char kHomepageURL
[] = "homepage_url";
53 const char kIcons
[] = "icons";
54 const char kId
[] = "id";
55 const char kImeOptionsPage
[] = "options_page";
56 const char kImport
[] = "import";
57 const char kIncognito
[] = "incognito";
58 const char kIncludeGlobs
[] = "include_globs";
59 const char kIndicator
[] = "indicator";
60 const char kInputComponents
[] = "input_components";
61 const char kInputView
[] = "input_view";
62 const char kIsolation
[] = "app.isolation";
63 const char kJs
[] = "js";
64 const char kKey
[] = "key";
65 const char kKeycode
[] = "keyCode";
66 const char kKioskEnabled
[] = "kiosk_enabled";
67 const char kKioskOnly
[] = "kiosk_only";
68 const char kKioskMode
[] = "kiosk_mode";
69 const char kLanguage
[] = "language";
70 const char kLaunch
[] = "app.launch";
71 const char kLaunchContainer
[] = "app.launch.container";
72 const char kLauncherPage
[] = "launcher_page";
73 const char kLauncherPagePage
[] = "launcher_page.page";
74 const char kLaunchHeight
[] = "app.launch.height";
75 const char kLaunchLocalPath
[] = "app.launch.local_path";
76 const char kLaunchWebURL
[] = "app.launch.web_url";
77 const char kLaunchWidth
[] = "app.launch.width";
78 const char kLayouts
[] = "layouts";
79 const char kManifestVersion
[] = "manifest_version";
80 const char kMatchAboutBlank
[] = "match_about_blank";
81 const char kMatches
[] = "matches";
82 const char kMinimumChromeVersion
[] = "minimum_chrome_version";
83 const char kMinimumVersion
[] = "minimum_version";
84 const char kMIMETypes
[] = "mime_types";
85 const char kMimeTypesHandler
[] = "mime_types_handler";
86 const char kName
[] = "name";
87 const char kNaClArch
[] = "nacl_arch";
88 const char kNaClModules
[] = "nacl_modules";
89 const char kNaClModulesMIMEType
[] = "mime_type";
90 const char kNaClModulesPath
[] = "path";
91 const char kOAuth2
[] = "oauth2";
92 const char kOAuth2AutoApprove
[] = "oauth2.auto_approve";
93 const char kOAuth2ClientId
[] = "oauth2.client_id";
94 const char kOAuth2Scopes
[] = "oauth2.scopes";
95 const char kOfflineEnabled
[] = "offline_enabled";
96 const char kOmnibox
[] = "omnibox";
97 const char kOmniboxKeyword
[] = "omnibox.keyword";
98 const char kOptionalPermissions
[] = "optional_permissions";
99 const char kOptionsPage
[] = "options_page";
100 const char kOptionsUI
[] = "options_ui";
101 const char kOverrideHomepage
[] = "chrome_settings_overrides.homepage";
102 const char kOverrideSearchProvider
[] =
103 "chrome_settings_overrides.search_provider";
104 const char kOverrideStartupPage
[] = "chrome_settings_overrides.startup_pages";
105 const char kPageAction
[] = "page_action";
106 const char kPageActionDefaultIcon
[] = "default_icon";
107 const char kPageActionDefaultPopup
[] = "default_popup";
108 const char kPageActionDefaultTitle
[] = "default_title";
109 const char kPageActionIcons
[] = "icons";
110 const char kPageActionId
[] = "id";
111 const char kPageActionPopup
[] = "popup";
112 const char kPageActionPopupPath
[] = "path";
113 const char kPermissions
[] = "permissions";
114 const char kPlatformAppBackground
[] = "app.background";
115 const char kPlatformAppBackgroundPage
[] = "app.background.page";
116 const char kPlatformAppBackgroundScripts
[] = "app.background.scripts";
117 const char kPlatformAppContentSecurityPolicy
[] = "app.content_security_policy";
118 const char kPlatforms
[] = "platforms";
119 const char kPlugins
[] = "plugins";
120 const char kPluginsPath
[] = "path";
121 const char kPluginsPublic
[] = "public";
122 const char kPublicKey
[] = "key";
123 const char kRemoveButton
[] = "remove_button";
124 const char kRequirements
[] = "requirements";
125 const char kRunAt
[] = "run_at";
126 const char kSandboxedPages
[] = "sandbox.pages";
127 const char kSandboxedPagesCSP
[] = "sandbox.content_security_policy";
128 const char kScriptBadge
[] = "script_badge";
129 const char kSettingsOverride
[] = "chrome_settings_overrides";
130 const char kSettingsOverrideAlternateUrls
[] =
131 "chrome_settings_overrides.search_provider.alternate_urls";
132 const char kShiftKey
[] = "shiftKey";
133 const char kShortcutKey
[] = "shortcutKey";
134 const char kShortName
[] = "short_name";
135 const char kSignature
[] = "signature";
136 const char kSockets
[] = "sockets";
137 const char kSpellcheck
[] = "spellcheck";
138 const char kSpellcheckDictionaryFormat
[] = "dictionary_format";
139 const char kSpellcheckDictionaryLanguage
[] = "dictionary_language";
140 const char kSpellcheckDictionaryLocale
[] = "dictionary_locale";
141 const char kSpellcheckDictionaryPath
[] = "dictionary_path";
142 const char kStorageManagedSchema
[] = "storage.managed_schema";
143 const char kSubPackagePath
[] = "sub_package_path";
144 const char kSuggestedKey
[] = "suggested_key";
145 const char kSynthesizeExtensionAction
[] = "_synthesize_extension_action";
146 const char kSystemIndicator
[] = "system_indicator";
147 const char kTheme
[] = "theme";
148 const char kThemeColors
[] = "colors";
149 const char kThemeDisplayProperties
[] = "properties";
150 const char kThemeImages
[] = "images";
151 const char kThemeTints
[] = "tints";
152 const char kTtsEngine
[] = "tts_engine";
153 const char kTtsGenderFemale
[] = "female";
154 const char kTtsGenderMale
[] = "male";
155 const char kTtsVoices
[] = "voices";
156 const char kTtsVoicesEventTypeEnd
[] = "end";
157 const char kTtsVoicesEventTypeError
[] = "error";
158 const char kTtsVoicesEventTypeMarker
[] = "marker";
159 const char kTtsVoicesEventTypeSentence
[] = "sentence";
160 const char kTtsVoicesEventTypeStart
[] = "start";
161 const char kTtsVoicesEventTypeWord
[] = "word";
162 const char kTtsVoicesEventTypes
[] = "event_types";
163 const char kTtsVoicesGender
[] = "gender";
164 const char kTtsVoicesLang
[] = "lang";
165 const char kTtsVoicesRemote
[] = "remote";
166 const char kTtsVoicesVoiceName
[] = "voice_name";
167 const char kType
[] = "type";
168 const char kUIOverride
[] = "chrome_ui_overrides";
169 const char kUpdateURL
[] = "update_url";
170 const char kUrlHandlers
[] = "url_handlers";
171 const char kUrlHandlerTitle
[] = "title";
172 const char kVersion
[] = "version";
173 const char kWebAccessibleResources
[] = "web_accessible_resources";
174 const char kWebURLs
[] = "app.urls";
175 const char kWebview
[] = "webview";
176 const char kWebviewAccessibleResources
[] = "accessible_resources";
177 const char kWebviewName
[] = "name";
178 const char kWebviewPartitions
[] = "partitions";
179 const char kWhitelist
[] = "whitelist";
181 } // namespace manifest_keys
183 namespace manifest_values
{
185 const char kBrowserActionCommandEvent
[] = "_execute_browser_action";
186 const char kIncognitoSplit
[] = "split";
187 const char kIncognitoSpanning
[] = "spanning";
188 const char kIntentDispositionWindow
[] = "window";
189 const char kIntentDispositionInline
[] = "inline";
190 const char kIsolatedStorage
[] = "storage";
191 const char kKeybindingPlatformChromeOs
[] = "chromeos";
192 const char kKeybindingPlatformDefault
[] = "default";
193 const char kKeybindingPlatformLinux
[] = "linux";
194 const char kKeybindingPlatformMac
[] = "mac";
195 const char kKeybindingPlatformWin
[] = "windows";
196 const char kKeyAlt
[] = "Alt";
197 const char kKeyComma
[] = "Comma";
198 const char kKeyCommand
[] = "Command";
199 const char kKeyCtrl
[] = "Ctrl";
200 const char kKeyDel
[] = "Delete";
201 const char kKeyDown
[] = "Down";
202 const char kKeyEnd
[] = "End";
203 const char kKeyHome
[] = "Home";
204 const char kKeyIns
[] = "Insert";
205 const char kKeyLeft
[] = "Left";
206 const char kKeyMacCtrl
[] = "MacCtrl";
207 const char kKeyMediaNextTrack
[] = "MediaNextTrack";
208 const char kKeyMediaPlayPause
[] = "MediaPlayPause";
209 const char kKeyMediaPrevTrack
[] = "MediaPrevTrack";
210 const char kKeyMediaStop
[] = "MediaStop";
211 const char kKeyPgDwn
[] = "PageDown";
212 const char kKeyPgUp
[] = "PageUp";
213 const char kKeyPeriod
[] = "Period";
214 const char kKeyRight
[] = "Right";
215 const char kKeySearch
[] = "Search";
216 const char kKeySeparator
[] = "+";
217 const char kKeyShift
[] = "Shift";
218 const char kKeyTab
[] = "Tab";
219 const char kKeyUp
[] = "Up";
220 const char kRunAtDocumentStart
[] = "document_start";
221 const char kRunAtDocumentEnd
[] = "document_end";
222 const char kRunAtDocumentIdle
[] = "document_idle";
223 const char kPageActionCommandEvent
[] = "_execute_page_action";
224 const char kPageActionTypeTab
[] = "tab";
225 const char kPageActionTypePermanent
[] = "permanent";
226 const char kScriptBadgeCommandEvent
[] = "_execute_script_badge";
227 const char kLaunchContainerPanel
[] = "panel";
228 const char kLaunchContainerTab
[] = "tab";
229 const char kLaunchContainerWindow
[] = "window";
231 } // namespace manifest_values
233 // Extension-related error messages. Some of these are simple patterns, where a
234 // '*' is replaced at runtime with a specific value. This is used instead of
235 // printf because we want to unit test them and scanf is hard to make
237 namespace manifest_errors
{
239 const char kActiveTabPermissionNotGranted
[] =
240 "The 'activeTab' permission is not in effect because this extension has "
241 "not been in invoked.";
242 const char kAllURLOrActiveTabNeeded
[] =
243 "Either the '<all_urls>' or 'activeTab' permission is required.";
244 const char kAppsNotEnabled
[] =
245 "Apps are not enabled.";
246 const char kBackgroundPermissionNeeded
[] =
247 "Hosted apps that use 'background_page' must have the 'background' "
249 const char kBackgroundRequiredForPlatformApps
[] =
250 "Packaged apps must have a background page or background scripts.";
251 const char kCannotAccessChromeUrl
[] = "Cannot access a chrome:// URL";
252 const char kCannotAccessExtensionUrl
[] =
253 "Cannot access a chrome-extension:// URL of different extension";
254 const char kCannotAccessPage
[] =
255 "Cannot access contents of url \"*\". "
256 "Extension manifest must request permission to access this host.";
257 const char kCannotChangeExtensionID
[] =
258 "Installed extensions cannot change their IDs.";
259 const char kCannotClaimAllHostsInExtent
[] =
260 "Cannot claim all hosts ('*') in an extent.";
261 const char kCannotClaimAllURLsInExtent
[] =
262 "Cannot claim all URLs in an extent.";
263 const char kCannotScriptGallery
[] =
264 "The extensions gallery cannot be scripted.";
265 const char kCannotScriptSigninPage
[] =
266 "The sign-in page cannot be scripted.";
267 const char kChromeVersionTooLow
[] =
268 "This extension requires * version * or greater.";
269 const char kDisabledByPolicy
[] =
270 "This extension has been disabled by your administrator.";
271 const char kExpectString
[] = "Expect string value.";
272 const char kExperimentalFlagRequired
[] =
273 "Loading extensions with 'experimental' permission is turned off by "
274 "default. You can enable 'Experimental Extension APIs' "
275 "by visiting chrome://flags.";
276 const char kInvalidAboutPage
[] = "Invalid value for 'about_page'.";
277 const char kInvalidAboutPageExpectRelativePath
[] =
278 "Invalid value for 'about_page'. Value must be a relative path.";
279 const char kInvalidAllFrames
[] =
280 "Invalid value for 'content_scripts[*].all_frames'.";
281 const char kInvalidBackground
[] =
282 "Invalid value for 'background_page'.";
283 const char kInvalidBackgroundAllowJsAccess
[] =
284 "Invalid value for 'background.allow_js_access'.";
285 const char kInvalidBackgroundCombination
[] =
286 "The background.page and background.scripts properties cannot be used at "
288 const char kInvalidBackgroundScript
[] =
289 "Invalid value for 'background.scripts[*]'.";
290 const char kInvalidBackgroundScripts
[] =
291 "Invalid value for 'background.scripts'.";
292 const char kInvalidBackgroundInHostedApp
[] =
293 "Invalid value for 'background_page'. Hosted apps must specify an "
294 "absolute HTTPS URL for the background page.";
295 const char kInvalidBackgroundPersistent
[] =
296 "Invalid value for 'background.persistent'.";
297 const char kInvalidBackgroundPersistentNoPage
[] =
298 "Must specify one of background.page or background.scripts to use"
299 " background.persistent.";
300 const char kInvalidBrowserAction
[] =
301 "Invalid value for 'browser_action'.";
302 const char kInvalidChromeURLOverrides
[] =
303 "Invalid value for 'chrome_url_overrides'.";
304 const char kInvalidCommandsKey
[] =
305 "Invalid value for 'commands'.";
306 const char kInvalidContentPack
[] =
307 "Invalid value for 'content_pack'.";
308 const char kInvalidContentPackSites
[] =
309 "Invalid value for Content Pack sites - files must be strings.";
310 const char kInvalidContentScript
[] =
311 "Invalid value for 'content_scripts[*]'.";
312 const char kInvalidContentSecurityPolicy
[] =
313 "Invalid value for 'content_security_policy'.";
314 const char kInvalidContentScriptsList
[] =
315 "Invalid value for 'content_scripts'.";
316 const char kInvalidCss
[] =
317 "Invalid value for 'content_scripts[*].css[*]'.";
318 const char kInvalidCssList
[] =
319 "Required value 'content_scripts[*].css' is invalid.";
320 const char kInvalidDefaultLocale
[] =
321 "Invalid value for default locale - locale name must be a string.";
322 const char kInvalidDescription
[] =
323 "Invalid value for 'description'.";
324 const char kInvalidDevToolsPage
[] =
325 "Invalid value for 'devtools_page'.";
326 const char kInvalidDisplayInLauncher
[] =
327 "Invalid value for 'display_in_launcher'.";
328 const char kInvalidDisplayInNewTabPage
[] =
329 "Invalid value for 'display_in_new_tab_page'.";
330 const char kInvalidEmptyDictionary
[] = "Empty dictionary for '*'.";
331 const char kInvalidExcludeMatch
[] =
332 "Invalid value for 'content_scripts[*].exclude_matches[*]': *";
333 const char kInvalidExcludeMatches
[] =
334 "Invalid value for 'content_scripts[*].exclude_matches'.";
335 const char kInvalidExport
[] =
336 "Invalid value for 'export'.";
337 const char kInvalidExportPermissions
[] =
338 "Permissions are not allowed for extensions that 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 "
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 "
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 kInvalidLauncherPage
[] = "Invalid value for 'launcher_page'.";
466 const char kInvalidLauncherPagePage
[] =
467 "Invalid value for 'launcher_page.page'.";
468 const char kInvalidLaunchContainer
[] =
469 "Invalid value for 'app.launch.container'.";
470 const char kInvalidLaunchValue
[] =
471 "Invalid value for '*'.";
472 const char kInvalidLaunchValueContainer
[] =
473 "Invalid container type for '*'.";
474 const char kInvalidManifest
[] =
475 "Manifest file is invalid.";
476 const char kInvalidManifestVersion
[] =
477 "Invalid value for 'manifest_version'. Must be an integer greater than "
479 const char kInvalidManifestVersionOld
[] =
480 "The 'manifest_version' key must be present and set to * (without quotes). "
481 "See developer.chrome.com/*/manifestVersion.html for details.";
482 const char kInvalidMatch
[] =
483 "Invalid value for 'content_scripts[*].matches[*]': *";
484 const char kInvalidMatchAboutBlank
[] =
485 "Invalid value for 'content_scripts[*].match_about_blank'.";
486 const char kInvalidMatchCount
[] =
487 "Invalid value for 'content_scripts[*].matches'. There must be at least "
488 "one match specified.";
489 const char kInvalidMatches
[] =
490 "Required value 'content_scripts[*].matches' is missing or invalid.";
491 const char kInvalidMIMETypes
[] =
492 "Invalid value for 'mime_types'";
493 const char kInvalidMimeTypesHandler
[] =
494 "Invalid value for 'mime_types'.";
495 const char kInvalidMinimumChromeVersion
[] =
496 "Invalid value for 'minimum_chrome_version'.";
497 const char kInvalidName
[] =
498 "Required value 'name' is missing or invalid.";
499 const char kInvalidNaClModules
[] =
500 "Invalid value for 'nacl_modules'.";
501 const char kInvalidNaClModulesPath
[] =
502 "Invalid value for 'nacl_modules[*].path'.";
503 const char kInvalidNaClModulesMIMEType
[] =
504 "Invalid value for 'nacl_modules[*].mime_type'.";
505 const char kInvalidOAuth2AutoApprove
[] =
506 "Invalid value for 'oauth2.auto_approve'. Value must be true or false.";
507 const char kInvalidOAuth2ClientId
[] =
508 "Invalid value for 'oauth2.client_id'.";
509 const char kInvalidOAuth2Scopes
[] =
510 "Invalid value for 'oauth2.scopes'.";
511 const char kInvalidOfflineEnabled
[] =
512 "Invalid value for 'offline_enabled'.";
513 const char kInvalidOmniboxKeyword
[] =
514 "Invalid value for 'omnibox.keyword'.";
515 const char kInvalidOptionsPage
[] = "Invalid value for '*'.";
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 "
521 const char kInvalidOptionsUIChromeStyle
[] =
522 "Invalid value for 'options_ui.chrome_style'.";
523 const char kInvalidOptionsUIOpenInTab
[] =
524 "Invalid value for 'options_ui.open_in_tab'.";
525 const char kInvalidPageAction
[] =
526 "Invalid value for 'page_action'.";
527 const char kInvalidPageActionDefaultTitle
[] =
528 "Invalid value for 'default_title'.";
529 const char kInvalidPageActionIconPath
[] =
530 "Invalid value for 'page_action.default_icon'.";
531 const char kInvalidPageActionId
[] =
532 "Required value 'id' is missing or invalid.";
533 const char kInvalidPageActionName
[] =
534 "Invalid value for 'page_action.name'.";
535 const char kInvalidPageActionOldAndNewKeys
[] =
536 "Key \"*\" is deprecated. Key \"*\" has the same meaning. You can not "
538 const char kInvalidPageActionPopup
[] =
539 "Invalid type for page action popup.";
540 const char kInvalidPageActionPopupPath
[] =
541 "Invalid value for page action popup path [*].";
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 kInvalidShortName
[] =
576 "Invalid value for 'short_name'.";
577 const char kInvalidSignature
[] =
578 "Value 'signature' is missing or invalid.";
579 const char kInvalidSpellcheck
[] =
580 "Invalid value for 'spellcheck'.";
581 const char kInvalidSpellcheckDictionaryFormat
[] =
582 "Invalid value for spellcheck dictionary format.";
583 const char kInvalidSpellcheckDictionaryLanguage
[] =
584 "Invalid value for spellcheck dictionary language.";
585 const char kInvalidSpellcheckDictionaryLocale
[] =
586 "Invalid value for spellcheck dictionary locale.";
587 const char kInvalidSpellcheckDictionaryPath
[] =
588 "Invalid value for spellcheck dictionary path.";
589 const char kInvalidStartupOverrideURL
[] =
590 "Invalid value for overriding startup URL: '[*]'.";
591 const char kInvalidSystemIndicator
[] =
592 "Invalid value for 'system_indicator'.";
593 const char kInvalidTheme
[] =
594 "Invalid value for 'theme'.";
595 const char kInvalidThemeColors
[] =
596 "Invalid value for theme colors - colors must be integers";
597 const char kInvalidThemeImages
[] =
598 "Invalid value for theme images - images must be strings.";
599 const char kInvalidThemeImagesMissing
[] =
600 "An image specified in the theme is missing.";
601 const char kInvalidThemeTints
[] =
602 "Invalid value for theme images - tints must be decimal numbers.";
603 const char kInvalidTts
[] =
604 "Invalid value for 'tts_engine'.";
605 const char kInvalidTtsVoices
[] =
606 "Invalid value for 'tts_engine.voices'.";
607 const char kInvalidTtsVoicesEventTypes
[] =
608 "Invalid value for 'tts_engine.voices[*].event_types'.";
609 const char kInvalidTtsVoicesGender
[] =
610 "Invalid value for 'tts_engine.voices[*].gender'.";
611 const char kInvalidTtsVoicesLang
[] =
612 "Invalid value for 'tts_engine.voices[*].lang'.";
613 const char kInvalidTtsVoicesRemote
[] =
614 "Invalid value for 'tts_engine.voices[*].remote'.";
615 const char kInvalidTtsVoicesVoiceName
[] =
616 "Invalid value for 'tts_engine.voices[*].voice_name'.";
617 const char kInvalidUpdateURL
[] =
618 "Invalid value for update url: '[*]'.";
619 const char kInvalidURLHandlers
[] =
620 "Invalid value for 'url_handlers'.";
621 const char kInvalidURLHandlerPatternElement
[] =
622 "Invalid value for 'url_handlers[*]'.";
623 const char kInvalidURLHandlerTitle
[] =
624 "Invalid value for 'url_handlers[*].title'.";
625 const char kInvalidURLHandlerPattern
[] =
626 "Invalid value for 'url_handlers[*].matches[*]'.";
627 const char kInvalidURLPatternError
[] =
628 "Invalid url pattern '*'";
629 const char kInvalidVersion
[] =
630 "Required value 'version' is missing or invalid. It must be between 1-4 "
631 "dot-separated integers each between 0 and 65536.";
632 const char kInvalidWebAccessibleResourcesList
[] =
633 "Invalid value for 'web_accessible_resources'.";
634 const char kInvalidWebAccessibleResource
[] =
635 "Invalid value for 'web_accessible_resources[*]'.";
636 const char kInvalidWebview
[] =
637 "Invalid value for 'webview'.";
638 const char kInvalidWebviewAccessibleResourcesList
[] =
639 "Invalid value for'webview.accessible_resources'.";
640 const char kInvalidWebviewAccessibleResource
[] =
641 "Invalid value for 'webview.accessible_resources[*]'.";
642 const char kInvalidWebviewPartition
[] =
643 "Invalid value for 'webview.partitions[*]'.";
644 const char kInvalidWebviewPartitionName
[] =
645 "Invalid value for 'webview.partitions[*].name'.";
646 const char kInvalidWebviewPartitionsList
[] =
647 "Invalid value for 'webview.partitions'.";
648 const char kInvalidWebURL
[] =
649 "Invalid value for 'app.urls[*]': *";
650 const char kInvalidWebURLs
[] =
651 "Invalid value for 'app.urls'.";
652 const char kInvalidZipHash
[] =
653 "Required key 'zip_hash' is missing or invalid.";
654 const char kInsecureContentSecurityPolicy
[] =
655 "Invalid value for 'content_security_policy': Both 'script-src' and"
656 " 'object-src' directives must be specified (either explicitly, or"
657 " implicitly via 'default-src'), and both must whitelist only secure"
658 " resources. You may include any of the following sources: \"'self'\","
659 " \"'unsafe-eval'\", \"http://127.0.0.1\", \"http://localhost\", or any"
660 " \"https://\" or \"chrome-extension://\" origin. For more information,"
661 " see http://developer.chrome.com/extensions/contentSecurityPolicy.html";
662 const char kKeyIsDeprecatedWithReplacement
[] =
663 "Key \"*\" is deprecated. Key \"*\" should be used instead.";
664 const char kLauncherPagePageRequired
[] =
665 "The 'launcher_page.page' key is required.";
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 "
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 "
717 const char kUnrecognizedManifestKey
[] = "Unrecognized manifest key '*'.";
718 const char kUnrecognizedManifestProperty
[] =
719 "Unrecognized property '*' of manifest key '*'.";
720 const char kWebRequestConflictsWithLazyBackground
[] =
721 "The 'webRequest' API cannot be used with event pages.";
722 #if defined(OS_CHROMEOS)
723 const char kIllegalPlugins
[] =
724 "Extensions cannot install plugins on Chrome OS";
727 } // namespace manifest_errors
729 } // namespace extensions