| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/extensions/extension_manifest_constants.h" | 5 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 6 | 6 |
| 7 namespace extension_manifest_keys { | 7 namespace extension_manifest_keys { |
| 8 | 8 |
| 9 const char kAllFrames[] = "all_frames"; | 9 const char kAllFrames[] = "all_frames"; |
| 10 const char kAltKey[] = "altKey"; | 10 const char kAltKey[] = "altKey"; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 const char kKeybindingPlatformLinux[] = "linux"; | 134 const char kKeybindingPlatformLinux[] = "linux"; |
| 135 const char kKeybindingPlatformMac[] = "mac"; | 135 const char kKeybindingPlatformMac[] = "mac"; |
| 136 const char kKeybindingPlatformWin[] = "windows"; | 136 const char kKeybindingPlatformWin[] = "windows"; |
| 137 const char kRunAtDocumentStart[] = "document_start"; | 137 const char kRunAtDocumentStart[] = "document_start"; |
| 138 const char kRunAtDocumentEnd[] = "document_end"; | 138 const char kRunAtDocumentEnd[] = "document_end"; |
| 139 const char kRunAtDocumentIdle[] = "document_idle"; | 139 const char kRunAtDocumentIdle[] = "document_idle"; |
| 140 const char kPageActionKeybindingEvent[] = "_execute_page_action"; | 140 const char kPageActionKeybindingEvent[] = "_execute_page_action"; |
| 141 const char kPageActionTypeTab[] = "tab"; | 141 const char kPageActionTypeTab[] = "tab"; |
| 142 const char kPageActionTypePermanent[] = "permanent"; | 142 const char kPageActionTypePermanent[] = "permanent"; |
| 143 const char kLaunchContainerPanel[] = "panel"; | 143 const char kLaunchContainerPanel[] = "panel"; |
| 144 const char kLaunchContainerShell[] = "shell"; | |
| 145 const char kLaunchContainerTab[] = "tab"; | 144 const char kLaunchContainerTab[] = "tab"; |
| 146 const char kLaunchContainerWindow[] = "window"; | 145 const char kLaunchContainerWindow[] = "window"; |
| 147 } // namespace extension_manifest_values | 146 } // namespace extension_manifest_values |
| 148 | 147 |
| 149 // Extension-related error messages. Some of these are simple patterns, where a | 148 // Extension-related error messages. Some of these are simple patterns, where a |
| 150 // '*' is replaced at runtime with a specific value. This is used instead of | 149 // '*' is replaced at runtime with a specific value. This is used instead of |
| 151 // printf because we want to unit test them and scanf is hard to make | 150 // printf because we want to unit test them and scanf is hard to make |
| 152 // cross-platform. | 151 // cross-platform. |
| 153 namespace extension_manifest_errors { | 152 namespace extension_manifest_errors { |
| 154 const char kAppsNotEnabled[] = | 153 const char kAppsNotEnabled[] = |
| 155 "Apps are not enabled."; | 154 "Apps are not enabled."; |
| 156 const char kBackgroundPermissionNeeded[] = | 155 const char kBackgroundPermissionNeeded[] = |
| 157 "Hosted apps that use 'background_page' must have the 'background' " | 156 "Hosted apps that use 'background_page' must have the 'background' " |
| 158 "permission."; | 157 "permission."; |
| 158 const char kBackgroundRequiredForPlatformApps[] = |
| 159 "Platform apps must have a background page or background scripts."; |
| 159 const char kCannotAccessPage[] = | 160 const char kCannotAccessPage[] = |
| 160 "Cannot access contents of url \"*\". " | 161 "Cannot access contents of url \"*\". " |
| 161 "Extension manifest must request permission to access this host."; | 162 "Extension manifest must request permission to access this host."; |
| 162 const char kCannotChangeExtensionID[] = | 163 const char kCannotChangeExtensionID[] = |
| 163 "Installed extensions cannot change their IDs."; | 164 "Installed extensions cannot change their IDs."; |
| 164 const char kCannotClaimAllHostsInExtent[] = | 165 const char kCannotClaimAllHostsInExtent[] = |
| 165 "Cannot claim all hosts ('*') in an extent."; | 166 "Cannot claim all hosts ('*') in an extent."; |
| 166 const char kCannotClaimAllURLsInExtent[] = | 167 const char kCannotClaimAllURLsInExtent[] = |
| 167 "Cannot claim all URLs in an extent."; | 168 "Cannot claim all URLs in an extent."; |
| 168 const char kCannotScriptGallery[] = | 169 const char kCannotScriptGallery[] = |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 const char kInvalidKeyBindingDictionary[] = | 305 const char kInvalidKeyBindingDictionary[] = |
| 305 "Contents of 'commands[*]' invalid."; | 306 "Contents of 'commands[*]' invalid."; |
| 306 const char kInvalidKeyBindingMissingPlatform[] = | 307 const char kInvalidKeyBindingMissingPlatform[] = |
| 307 "Could not find key specification for 'command[*].*': Either specify a key " | 308 "Could not find key specification for 'command[*].*': Either specify a key " |
| 308 "for '*', or specify a default key."; | 309 "for '*', or specify a default key."; |
| 309 const char kInvalidKeyBindingUnknownPlatform[] = | 310 const char kInvalidKeyBindingUnknownPlatform[] = |
| 310 "Unknown platform for 'command[*]': *. Valid values are: 'windows', 'mac'" | 311 "Unknown platform for 'command[*]': *. Valid values are: 'windows', 'mac'" |
| 311 " 'chromeos', 'linux' and 'default'."; | 312 " 'chromeos', 'linux' and 'default'."; |
| 312 const char kInvalidLaunchContainer[] = | 313 const char kInvalidLaunchContainer[] = |
| 313 "Invalid value for 'app.launch.container'."; | 314 "Invalid value for 'app.launch.container'."; |
| 314 const char kInvalidLaunchContainerForNonPlatform[] = | |
| 315 "'app.launch.container' = 'shell' can only be used with platform_app."; | |
| 316 const char kInvalidLaunchContainerForPlatform[] = | |
| 317 "platform_app requires 'app.launch.container' == 'shell'."; | |
| 318 const char kInvalidLaunchValue[] = | 315 const char kInvalidLaunchValue[] = |
| 319 "Invalid value for '*'."; | 316 "Invalid value for '*'."; |
| 320 const char kInvalidLaunchValueContainer[] = | 317 const char kInvalidLaunchValueContainer[] = |
| 321 "Invalid container type for '*'."; | 318 "Invalid container type for '*'."; |
| 322 const char kInvalidManifest[] = | 319 const char kInvalidManifest[] = |
| 323 "Manifest file is invalid."; | 320 "Manifest file is invalid."; |
| 324 const char kInvalidManifestVersion[] = | 321 const char kInvalidManifestVersion[] = |
| 325 "The 'manifest_version' key must be present and set to 2 (without quotes)."; | 322 "The 'manifest_version' key must be present and set to 2 (without quotes)."; |
| 326 const char kInvalidMatch[] = | 323 const char kInvalidMatch[] = |
| 327 "Invalid value for 'content_scripts[*].matches[*]': *"; | 324 "Invalid value for 'content_scripts[*].matches[*]': *"; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 "Invalid value for 'app.urls[*]': *"; | 432 "Invalid value for 'app.urls[*]': *"; |
| 436 const char kInvalidWebURLs[] = | 433 const char kInvalidWebURLs[] = |
| 437 "Invalid value for 'app.urls'."; | 434 "Invalid value for 'app.urls'."; |
| 438 const char kInvalidZipHash[] = | 435 const char kInvalidZipHash[] = |
| 439 "Required key 'zip_hash' is missing or invalid."; | 436 "Required key 'zip_hash' is missing or invalid."; |
| 440 const char kLaunchPathAndExtentAreExclusive[] = | 437 const char kLaunchPathAndExtentAreExclusive[] = |
| 441 "The 'app.launch.local_path' and 'app.urls' keys cannot both be set."; | 438 "The 'app.launch.local_path' and 'app.urls' keys cannot both be set."; |
| 442 const char kLaunchPathAndURLAreExclusive[] = | 439 const char kLaunchPathAndURLAreExclusive[] = |
| 443 "The 'app.launch.local_path' and 'app.launch.web_url' keys cannot " | 440 "The 'app.launch.local_path' and 'app.launch.web_url' keys cannot " |
| 444 "both be set."; | 441 "both be set."; |
| 442 const char kLaunchNotAllowedForPlatformApps[] = |
| 443 "Platform apps may not have 'app.launch' keys."; |
| 445 const char kLaunchURLRequired[] = | 444 const char kLaunchURLRequired[] = |
| 446 "Either 'app.launch.local_path' or 'app.launch.web_url' is required."; | 445 "Either 'app.launch.local_path' or 'app.launch.web_url' is required."; |
| 447 const char kLocalesMessagesFileMissing[] = | 446 const char kLocalesMessagesFileMissing[] = |
| 448 "Messages file is missing for locale."; | 447 "Messages file is missing for locale."; |
| 449 const char kLocalesNoDefaultLocaleSpecified[] = | 448 const char kLocalesNoDefaultLocaleSpecified[] = |
| 450 "Localization used, but default_locale wasn't specified in the manifest."; | 449 "Localization used, but default_locale wasn't specified in the manifest."; |
| 451 const char kLocalesNoDefaultMessages[] = | 450 const char kLocalesNoDefaultMessages[] = |
| 452 "Default locale is defined but default data couldn't be loaded."; | 451 "Default locale is defined but default data couldn't be loaded."; |
| 453 const char kLocalesNoValidLocaleNamesListed[] = | 452 const char kLocalesNoValidLocaleNamesListed[] = |
| 454 "No valid locale name could be found in _locales directory."; | 453 "No valid locale name could be found in _locales directory."; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 472 "Loading platform_app extension type is turned off by default. " | 471 "Loading platform_app extension type is turned off by default. " |
| 473 "You can enable this type with the --enable-platform-apps " | 472 "You can enable this type with the --enable-platform-apps " |
| 474 "command-line flag."; | 473 "command-line flag."; |
| 475 const char kReservedMessageFound[] = | 474 const char kReservedMessageFound[] = |
| 476 "Reserved key * found in message catalog."; | 475 "Reserved key * found in message catalog."; |
| 477 #if defined(OS_CHROMEOS) | 476 #if defined(OS_CHROMEOS) |
| 478 const char kIllegalPlugins[] = | 477 const char kIllegalPlugins[] = |
| 479 "Extensions cannot install plugins on Chrome OS"; | 478 "Extensions cannot install plugins on Chrome OS"; |
| 480 #endif | 479 #endif |
| 481 } // namespace extension_manifest_errors | 480 } // namespace extension_manifest_errors |
| OLD | NEW |