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 kFileHandlerTitle[] = "title"; 50 const char kFileHandlerTypes[] = "types"; 51 const char kGlobal[] = "global"; 52 const char kHideBookmarkButton[] = "hide_bookmark_button"; 53 const char kHomepageURL[] = "homepage_url"; 54 const char kIcons[] = "icons"; 55 const char kId[] = "id"; 56 const char kImeOptionsPage[] = "options_page"; 57 const char kImport[] = "import"; 58 const char kIncognito[] = "incognito"; 59 const char kIncludeGlobs[] = "include_globs"; 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 kLaunchHeight[] = "app.launch.height"; 73 const char kLaunchLocalPath[] = "app.launch.local_path"; 74 const char kLaunchWebURL[] = "app.launch.web_url"; 75 const char kLaunchWidth[] = "app.launch.width"; 76 const char kLayouts[] = "layouts"; 77 const char kManifestVersion[] = "manifest_version"; 78 const char kMatchAboutBlank[] = "match_about_blank"; 79 const char kMatches[] = "matches"; 80 const char kMinimumChromeVersion[] = "minimum_chrome_version"; 81 const char kMinimumVersion[] = "minimum_version"; 82 const char kMIMETypes[] = "mime_types"; 83 const char kMimeTypesHandler[] = "mime_types_handler"; 84 const char kName[] = "name"; 85 const char kNaClModules[] = "nacl_modules"; 86 const char kNaClModulesMIMEType[] = "mime_type"; 87 const char kNaClModulesPath[] = "path"; 88 const char kOAuth2[] = "oauth2"; 89 const char kOAuth2AutoApprove[] = "oauth2.auto_approve"; 90 const char kOAuth2ClientId[] = "oauth2.client_id"; 91 const char kOAuth2Scopes[] = "oauth2.scopes"; 92 const char kOfflineEnabled[] = "offline_enabled"; 93 const char kOmnibox[] = "omnibox"; 94 const char kOmniboxKeyword[] = "omnibox.keyword"; 95 const char kOptionalPermissions[] = "optional_permissions"; 96 const char kOptionsPage[] = "options_page"; 97 const char kOverrideHomepage[] = "chrome_settings_overrides.homepage"; 98 const char kOverrideSearchProvider[] = 99 "chrome_settings_overrides.search_provider"; 100 const char kOverrideStartupPage[] = "chrome_settings_overrides.startup_pages"; 101 const char kPageAction[] = "page_action"; 102 const char kPageActionDefaultIcon[] = "default_icon"; 103 const char kPageActionDefaultPopup[] = "default_popup"; 104 const char kPageActionDefaultTitle[] = "default_title"; 105 const char kPageActionIcons[] = "icons"; 106 const char kPageActionId[] = "id"; 107 const char kPageActionPopup[] = "popup"; 108 const char kPageActionPopupPath[] = "path"; 109 const char kPageActions[] = "page_actions"; 110 const char kPermissions[] = "permissions"; 111 const char kPlatformAppBackground[] = "app.background"; 112 const char kPlatformAppBackgroundPage[] = "app.background.page"; 113 const char kPlatformAppBackgroundScripts[] = "app.background.scripts"; 114 const char kPlatformAppContentSecurityPolicy[] = "app.content_security_policy"; 115 const char kPlatformAppServiceWorker[] = "app.service_worker"; 116 const char kPlatformAppServiceWorkerScript[] = "app.service_worker.script"; 117 const char kPlugins[] = "plugins"; 118 const char kPluginsPath[] = "path"; 119 const char kPluginsPublic[] = "public"; 120 const char kPublicKey[] = "key"; 121 const char kRemoveButton[] = "remove_button"; 122 const char kResources[] = "resources"; 123 const char kRequirements[] = "requirements"; 124 const char kRunAt[] = "run_at"; 125 const char kSandboxedPages[] = "sandbox.pages"; 126 const char kSandboxedPagesCSP[] = "sandbox.content_security_policy"; 127 const char kScriptBadge[] = "script_badge"; 128 const char kSettingsOverride[] = "chrome_settings_overrides"; 129 const char kSettingsOverrideAlternateUrls[] = 130 "chrome_settings_overrides.search_provider.alternate_urls"; 131 const char kShiftKey[] = "shiftKey"; 132 const char kShortcutKey[] = "shortcutKey"; 133 const char kShortName[] = "short_name"; 134 const char kSignature[] = "signature"; 135 const char kSockets[] = "sockets"; 136 const char kSpellcheck[] = "spellcheck"; 137 const char kSpellcheckDictionaryFormat[] = "dictionary_format"; 138 const char kSpellcheckDictionaryLanguage[] = "dictionary_language"; 139 const char kSpellcheckDictionaryLocale[] = "dictionary_locale"; 140 const char kSpellcheckDictionaryPath[] = "dictionary_path"; 141 const char kStorageManagedSchema[] = "storage.managed_schema"; 142 const char kSuggestedKey[] = "suggested_key"; 143 const char kSystemIndicator[] = "system_indicator"; 144 const char kTheme[] = "theme"; 145 const char kThemeColors[] = "colors"; 146 const char kThemeDisplayProperties[] = "properties"; 147 const char kThemeImages[] = "images"; 148 const char kThemeTints[] = "tints"; 149 const char kTtsEngine[] = "tts_engine"; 150 const char kTtsGenderFemale[] = "female"; 151 const char kTtsGenderMale[] = "male"; 152 const char kTtsVoices[] = "voices"; 153 const char kTtsVoicesEventTypeEnd[] = "end"; 154 const char kTtsVoicesEventTypeError[] = "error"; 155 const char kTtsVoicesEventTypeMarker[] = "marker"; 156 const char kTtsVoicesEventTypeSentence[] = "sentence"; 157 const char kTtsVoicesEventTypeStart[] = "start"; 158 const char kTtsVoicesEventTypeWord[] = "word"; 159 const char kTtsVoicesEventTypes[] = "event_types"; 160 const char kTtsVoicesGender[] = "gender"; 161 const char kTtsVoicesLang[] = "lang"; 162 const char kTtsVoicesRemote[] = "remote"; 163 const char kTtsVoicesVoiceName[] = "voice_name"; 164 const char kType[] = "type"; 165 const char kUIOverride[] = "chrome_ui_overrides"; 166 const char kUpdateURL[] = "update_url"; 167 const char kUrlHandlers[] = "url_handlers"; 168 const char kUrlHandlerTitle[] = "title"; 169 const char kVersion[] = "version"; 170 const char kWebAccessibleResources[] = "web_accessible_resources"; 171 const char kWebURLs[] = "app.urls"; 172 const char kWebview[] = "webview"; 173 const char kWebviewAccessibleResources[] = "accessible_resources"; 174 const char kWebviewName[] = "name"; 175 const char kWebviewPartitions[] = "partitions"; 176 const char kWhitelist[] = "whitelist"; 177 178 } // namespace manifest_keys 179 180 namespace manifest_values { 181 182 const char kBrowserActionCommandEvent[] = "_execute_browser_action"; 183 const char kIncognitoSplit[] = "split"; 184 const char kIncognitoSpanning[] = "spanning"; 185 const char kIntentDispositionWindow[] = "window"; 186 const char kIntentDispositionInline[] = "inline"; 187 const char kIsolatedStorage[] = "storage"; 188 const char kKeybindingPlatformChromeOs[] = "chromeos"; 189 const char kKeybindingPlatformDefault[] = "default"; 190 const char kKeybindingPlatformLinux[] = "linux"; 191 const char kKeybindingPlatformMac[] = "mac"; 192 const char kKeybindingPlatformWin[] = "windows"; 193 const char kKeyAlt[] = "Alt"; 194 const char kKeyComma[] = "Comma"; 195 const char kKeyCommand[] = "Command"; 196 const char kKeyCtrl[] = "Ctrl"; 197 const char kKeyDel[] = "Delete"; 198 const char kKeyDown[] = "Down"; 199 const char kKeyEnd[] = "End"; 200 const char kKeyHome[] = "Home"; 201 const char kKeyIns[] = "Insert"; 202 const char kKeyLeft[] = "Left"; 203 const char kKeyMacCtrl[] = "MacCtrl"; 204 const char kKeyMediaNextTrack[] = "MediaNextTrack"; 205 const char kKeyMediaPlayPause[] = "MediaPlayPause"; 206 const char kKeyMediaPrevTrack[] = "MediaPrevTrack"; 207 const char kKeyMediaStop[] = "MediaStop"; 208 const char kKeyPgDwn[] = "PageDown"; 209 const char kKeyPgUp[] = "PageUp"; 210 const char kKeyPeriod[] = "Period"; 211 const char kKeyRight[] = "Right"; 212 const char kKeySeparator[] = "+"; 213 const char kKeyShift[] = "Shift"; 214 const char kKeyTab[] = "Tab"; 215 const char kKeyUp[] = "Up"; 216 const char kRunAtDocumentStart[] = "document_start"; 217 const char kRunAtDocumentEnd[] = "document_end"; 218 const char kRunAtDocumentIdle[] = "document_idle"; 219 const char kPageActionCommandEvent[] = "_execute_page_action"; 220 const char kPageActionTypeTab[] = "tab"; 221 const char kPageActionTypePermanent[] = "permanent"; 222 const char kScriptBadgeCommandEvent[] = "_execute_script_badge"; 223 const char kLaunchContainerPanel[] = "panel"; 224 const char kLaunchContainerTab[] = "tab"; 225 const char kLaunchContainerWindow[] = "window"; 226 227 } // namespace manifest_values 228 229 // Extension-related error messages. Some of these are simple patterns, where a 230 // '*' is replaced at runtime with a specific value. This is used instead of 231 // printf because we want to unit test them and scanf is hard to make 232 // cross-platform. 233 namespace manifest_errors { 234 235 const char kActiveTabPermissionNotGranted[] = 236 "The 'activeTab' permission is not in effect because this extension has " 237 "not been in invoked."; 238 const char kAllURLOrActiveTabNeeded[] = 239 "Either the '<all_urls>' or 'activeTab' permission is required."; 240 const char kAppsNotEnabled[] = 241 "Apps are not enabled."; 242 const char kBackgroundPermissionNeeded[] = 243 "Hosted apps that use 'background_page' must have the 'background' " 244 "permission."; 245 const char kBackgroundRequiredForPlatformApps[] = 246 "Packaged apps must have a background page or background scripts."; 247 const char kCannotAccessChromeUrl[] = "Cannot access a chrome:// URL"; 248 const char kCannotAccessExtensionUrl[] = 249 "Cannot access a chrome-extension:// URL of different extension"; 250 const char kCannotAccessPage[] = 251 "Cannot access contents of url \"*\". " 252 "Extension manifest must request permission to access this host."; 253 const char kCannotChangeExtensionID[] = 254 "Installed extensions cannot change their IDs."; 255 const char kCannotClaimAllHostsInExtent[] = 256 "Cannot claim all hosts ('*') in an extent."; 257 const char kCannotClaimAllURLsInExtent[] = 258 "Cannot claim all URLs in an extent."; 259 const char kCannotScriptGallery[] = 260 "The extensions gallery cannot be scripted."; 261 const char kCannotScriptSigninPage[] = 262 "The sign-in page cannot be scripted."; 263 const char kChromeVersionTooLow[] = 264 "This extension requires * version * or greater."; 265 const char kDisabledByPolicy[] = 266 "This extension has been disabled by your administrator."; 267 const char kExpectString[] = "Expect string value."; 268 const char kExperimentalFlagRequired[] = 269 "Loading extensions with 'experimental' permission is turned off by " 270 "default. You can enable 'Experimental Extension APIs' " 271 "by visiting chrome://flags."; 272 const char kInvalidAboutPage[] = "Invalid value for 'about_page'."; 273 const char kInvalidAboutPageExpectRelativePath[] = 274 "Invalid value for 'about_page'. Value must be a relative path."; 275 const char kInvalidAllFrames[] = 276 "Invalid value for 'content_scripts[*].all_frames'."; 277 const char kInvalidBackground[] = 278 "Invalid value for 'background_page'."; 279 const char kInvalidBackgroundAllowJsAccess[] = 280 "Invalid value for 'background.allow_js_access'."; 281 const char kInvalidBackgroundCombination[] = 282 "The background.page and background.scripts properties cannot be used at " 283 "the same time."; 284 const char kInvalidBackgroundScript[] = 285 "Invalid value for 'background.scripts[*]'."; 286 const char kInvalidBackgroundScripts[] = 287 "Invalid value for 'background.scripts'."; 288 const char kInvalidBackgroundInHostedApp[] = 289 "Invalid value for 'background_page'. Hosted apps must specify an " 290 "absolute HTTPS URL for the background page."; 291 const char kInvalidBackgroundPersistent[] = 292 "Invalid value for 'background.persistent'."; 293 const char kInvalidBackgroundPersistentNoPage[] = 294 "Must specify one of background.page or background.scripts to use" 295 " background.persistent."; 296 const char kInvalidBrowserAction[] = 297 "Invalid value for 'browser_action'."; 298 const char kInvalidChromeURLOverrides[] = 299 "Invalid value for 'chrome_url_overrides'."; 300 const char kInvalidCommandsKey[] = 301 "Invalid value for 'commands'."; 302 const char kInvalidContentPack[] = 303 "Invalid value for 'content_pack'."; 304 const char kInvalidContentPackSites[] = 305 "Invalid value for Content Pack sites - files must be strings."; 306 const char kInvalidContentScript[] = 307 "Invalid value for 'content_scripts[*]'."; 308 const char kInvalidContentSecurityPolicy[] = 309 "Invalid value for 'content_security_policy'."; 310 const char kInvalidContentScriptsList[] = 311 "Invalid value for 'content_scripts'."; 312 const char kInvalidCss[] = 313 "Invalid value for 'content_scripts[*].css[*]'."; 314 const char kInvalidCssList[] = 315 "Required value 'content_scripts[*].css' is invalid."; 316 const char kInvalidDefaultLocale[] = 317 "Invalid value for default locale - locale name must be a string."; 318 const char kInvalidDescription[] = 319 "Invalid value for 'description'."; 320 const char kInvalidDevToolsPage[] = 321 "Invalid value for 'devtools_page'."; 322 const char kInvalidDisplayInLauncher[] = 323 "Invalid value for 'display_in_launcher'."; 324 const char kInvalidDisplayInNewTabPage[] = 325 "Invalid value for 'display_in_new_tab_page'."; 326 const char kInvalidEmptyDictionary[] = "Empty dictionary for '*'."; 327 const char kInvalidExcludeMatch[] = 328 "Invalid value for 'content_scripts[*].exclude_matches[*]': *"; 329 const char kInvalidExcludeMatches[] = 330 "Invalid value for 'content_scripts[*].exclude_matches'."; 331 const char kInvalidExport[] = 332 "Invalid value for 'export'."; 333 const char kInvalidExportPermissions[] = 334 "Permissions are not allowed for extensions that export resources."; 335 const char kInvalidExportResources[] = 336 "Invalid value for 'export.resources'."; 337 const char kInvalidExportResourcesString[] = 338 "Invalid value for 'export.resources[*]'."; 339 const char kInvalidExportWhitelist[] = 340 "Invalid value for 'export.whitelist'."; 341 const char kInvalidExportWhitelistString[] = 342 "Invalid value for 'export.whitelist[*]'."; 343 const char kInvalidFileAccessList[] = 344 "Invalid value for 'file_access'."; 345 const char kInvalidFileAccessValue[] = 346 "Invalid value for 'file_access[*]'."; 347 const char kInvalidFileBrowserHandler[] = 348 "Invalid value for 'file_browser_handlers'."; 349 const char kInvalidFileFiltersList[] = 350 "Invalid value for 'file_filters'."; 351 const char kInvalidFileFilterValue[] = 352 "Invalid value for 'file_filters[*]'."; 353 const char kInvalidFileHandlers[] = 354 "Invalid value for 'file_handlers'."; 355 const char kInvalidFileHandlersTooManyTypesAndExtensions[] = 356 "Too many MIME and extension file_handlers have been declared."; 357 const char kInvalidFileHandlerExtension[] = 358 "Invalid value for 'file_handlers[*].extensions'."; 359 const char kInvalidFileHandlerExtensionElement[] = 360 "Invalid value for 'file_handlers[*].extensions[*]'."; 361 const char kInvalidFileHandlerNoTypeOrExtension[] = 362 "'file_handlers[*]' must contain a non-empty 'types' or 'extensions'."; 363 const char kInvalidFileHandlerTitle[] = 364 "Invalid value for 'file_handlers[*].title'."; 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 --enable-service-worker command-line " 721 "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 735