| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_constants.h" | 5 #include "chrome/common/extensions/extension_constants.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const char kPermissions[] = "permissions"; | 78 const char kPermissions[] = "permissions"; |
| 79 const char kPlatformApp[] = "platform_app"; | 79 const char kPlatformApp[] = "platform_app"; |
| 80 const char kPlugins[] = "plugins"; | 80 const char kPlugins[] = "plugins"; |
| 81 const char kPluginsPath[] = "path"; | 81 const char kPluginsPath[] = "path"; |
| 82 const char kPluginsPublic[] = "public"; | 82 const char kPluginsPublic[] = "public"; |
| 83 const char kPublicKey[] = "key"; | 83 const char kPublicKey[] = "key"; |
| 84 const char kRequirements[] = "requirements"; | 84 const char kRequirements[] = "requirements"; |
| 85 const char kRunAt[] = "run_at"; | 85 const char kRunAt[] = "run_at"; |
| 86 const char kShiftKey[] = "shiftKey"; | 86 const char kShiftKey[] = "shiftKey"; |
| 87 const char kShortcutKey[] = "shortcutKey"; | 87 const char kShortcutKey[] = "shortcutKey"; |
| 88 const char kSidebar[] = "sidebar"; | |
| 89 const char kSidebarDefaultIcon[] = "default_icon"; | |
| 90 const char kSidebarDefaultPage[] = "default_page"; | |
| 91 const char kSidebarDefaultTitle[] = "default_title"; | |
| 92 const char kSignature[] = "signature"; | 88 const char kSignature[] = "signature"; |
| 93 const char kTheme[] = "theme"; | 89 const char kTheme[] = "theme"; |
| 94 const char kThemeColors[] = "colors"; | 90 const char kThemeColors[] = "colors"; |
| 95 const char kThemeDisplayProperties[] = "properties"; | 91 const char kThemeDisplayProperties[] = "properties"; |
| 96 const char kThemeImages[] = "images"; | 92 const char kThemeImages[] = "images"; |
| 97 const char kThemeTints[] = "tints"; | 93 const char kThemeTints[] = "tints"; |
| 98 const char kTtsEngine[] = "tts_engine"; | 94 const char kTtsEngine[] = "tts_engine"; |
| 99 const char kTtsGenderFemale[] = "female"; | 95 const char kTtsGenderFemale[] = "female"; |
| 100 const char kTtsGenderMale[] = "male"; | 96 const char kTtsGenderMale[] = "male"; |
| 101 const char kTtsVoices[] = "voices"; | 97 const char kTtsVoices[] = "voices"; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 const char kInvalidPluginsPath[] = | 334 const char kInvalidPluginsPath[] = |
| 339 "Invalid value for 'plugins[*].path'."; | 335 "Invalid value for 'plugins[*].path'."; |
| 340 const char kInvalidPluginsPublic[] = | 336 const char kInvalidPluginsPublic[] = |
| 341 "Invalid value for 'plugins[*].public'."; | 337 "Invalid value for 'plugins[*].public'."; |
| 342 const char kInvalidRequirement[] = | 338 const char kInvalidRequirement[] = |
| 343 "Invalid value for requirement \"*\""; | 339 "Invalid value for requirement \"*\""; |
| 344 const char kInvalidRequirements[] = | 340 const char kInvalidRequirements[] = |
| 345 "Invalid value for 'requirements'"; | 341 "Invalid value for 'requirements'"; |
| 346 const char kInvalidRunAt[] = | 342 const char kInvalidRunAt[] = |
| 347 "Invalid value for 'content_scripts[*].run_at'."; | 343 "Invalid value for 'content_scripts[*].run_at'."; |
| 348 const char kInvalidSidebar[] = | |
| 349 "Invalid value for 'sidebar'."; | |
| 350 const char kInvalidSidebarDefaultIconPath[] = | |
| 351 "Invalid value for 'sidebar.default_icon'."; | |
| 352 const char kInvalidSidebarDefaultPage[] = | |
| 353 "Invalid value for 'sidebar.default_page'."; | |
| 354 const char kInvalidSidebarDefaultTitle[] = | |
| 355 "Invalid value for 'sidebar.default_title'."; | |
| 356 const char kInvalidSignature[] = | 344 const char kInvalidSignature[] = |
| 357 "Value 'signature' is missing or invalid."; | 345 "Value 'signature' is missing or invalid."; |
| 358 const char kInvalidTheme[] = | 346 const char kInvalidTheme[] = |
| 359 "Invalid value for 'theme'."; | 347 "Invalid value for 'theme'."; |
| 360 const char kInvalidThemeColors[] = | 348 const char kInvalidThemeColors[] = |
| 361 "Invalid value for theme colors - colors must be integers"; | 349 "Invalid value for theme colors - colors must be integers"; |
| 362 const char kInvalidThemeImages[] = | 350 const char kInvalidThemeImages[] = |
| 363 "Invalid value for theme images - images must be strings."; | 351 "Invalid value for theme images - images must be strings."; |
| 364 const char kInvalidThemeImagesMissing[] = | 352 const char kInvalidThemeImagesMissing[] = |
| 365 "An image specified in the theme is missing."; | 353 "An image specified in the theme is missing."; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 const char kMultipleOverrides[] = | 404 const char kMultipleOverrides[] = |
| 417 "An extension cannot override more than one page."; | 405 "An extension cannot override more than one page."; |
| 418 const char kNoWildCardsInPaths[] = | 406 const char kNoWildCardsInPaths[] = |
| 419 "Wildcards are not allowed in extent URL pattern paths."; | 407 "Wildcards are not allowed in extent URL pattern paths."; |
| 420 const char kOneUISurfaceOnly[] = | 408 const char kOneUISurfaceOnly[] = |
| 421 "Only one of 'browser_action', 'page_action', and 'app' can be specified."; | 409 "Only one of 'browser_action', 'page_action', and 'app' can be specified."; |
| 422 const char kPermissionNotAllowed[] = | 410 const char kPermissionNotAllowed[] = |
| 423 "Access to permission '*' denied."; | 411 "Access to permission '*' denied."; |
| 424 const char kReservedMessageFound[] = | 412 const char kReservedMessageFound[] = |
| 425 "Reserved key * found in message catalog."; | 413 "Reserved key * found in message catalog."; |
| 426 const char kSidebarExperimental[] = | |
| 427 "You must request the 'experimental' permission in order to use the" | |
| 428 " Sidebar API."; | |
| 429 #if defined(OS_CHROMEOS) | 414 #if defined(OS_CHROMEOS) |
| 430 const char kIllegalPlugins[] = | 415 const char kIllegalPlugins[] = |
| 431 "Extensions cannot install plugins on Chrome OS"; | 416 "Extensions cannot install plugins on Chrome OS"; |
| 432 #endif | 417 #endif |
| 433 } // namespace extension_manifest_errors | 418 } // namespace extension_manifest_errors |
| 434 | 419 |
| 435 namespace extension_urls { | 420 namespace extension_urls { |
| 436 std::string GetWebstoreLaunchURL() { | 421 std::string GetWebstoreLaunchURL() { |
| 437 std::string gallery_prefix = kGalleryBrowsePrefix; | 422 std::string gallery_prefix = kGalleryBrowsePrefix; |
| 438 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL)) | 423 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL)) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; | 474 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; |
| 490 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; | 475 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; |
| 491 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; | 476 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; |
| 492 #if defined(OS_CHROMEOS) | 477 #if defined(OS_CHROMEOS) |
| 493 const char kAccessExtensionPath[] = | 478 const char kAccessExtensionPath[] = |
| 494 "/usr/share/chromeos-assets/accessibility/extensions"; | 479 "/usr/share/chromeos-assets/accessibility/extensions"; |
| 495 const char kChromeVoxDirectoryName[] = "access_chromevox"; | 480 const char kChromeVoxDirectoryName[] = "access_chromevox"; |
| 496 #endif | 481 #endif |
| 497 | 482 |
| 498 } | 483 } |
| OLD | NEW |