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