| 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_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" |
| 11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 | 12 |
| 13 namespace extension_manifest_keys { | 13 namespace extension_manifest_keys { |
| 14 | 14 |
| 15 const char kAllFrames[] = "all_frames"; | 15 const char kAllFrames[] = "all_frames"; |
| 16 const char kAltKey[] = "altKey"; | 16 const char kAltKey[] = "altKey"; |
| 17 const char kApp[] = "app"; | 17 const char kApp[] = "app"; |
| 18 const char kBackground[] = "background"; | 18 const char kBackground[] = "background"; |
| 19 const char kBackgroundPage[] = "background.page"; | 19 const char kBackgroundPage[] = "background.page"; |
| 20 const char kBackgroundPageLegacy[] = "background_page"; | 20 const char kBackgroundPageLegacy[] = "background_page"; |
| 21 const char kBackgroundScripts[] = "background.scripts"; |
| 21 const char kBrowserAction[] = "browser_action"; | 22 const char kBrowserAction[] = "browser_action"; |
| 22 const char kChromeURLOverrides[] = "chrome_url_overrides"; | 23 const char kChromeURLOverrides[] = "chrome_url_overrides"; |
| 23 const char kContentScripts[] = "content_scripts"; | 24 const char kContentScripts[] = "content_scripts"; |
| 24 const char kContentSecurityPolicy[] = "content_security_policy"; | 25 const char kContentSecurityPolicy[] = "content_security_policy"; |
| 25 const char kConvertedFromUserScript[] = "converted_from_user_script"; | 26 const char kConvertedFromUserScript[] = "converted_from_user_script"; |
| 26 const char kCss[] = "css"; | 27 const char kCss[] = "css"; |
| 27 const char kCtrlKey[] = "ctrlKey"; | 28 const char kCtrlKey[] = "ctrlKey"; |
| 28 const char kCurrentLocale[] = "current_locale"; | 29 const char kCurrentLocale[] = "current_locale"; |
| 29 const char kDefaultLocale[] = "default_locale"; | 30 const char kDefaultLocale[] = "default_locale"; |
| 30 const char kDescription[] = "description"; | 31 const char kDescription[] = "description"; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 const char kExpectString[] = "Expect string value."; | 161 const char kExpectString[] = "Expect string value."; |
| 161 const char kExperimentalFlagRequired[] = | 162 const char kExperimentalFlagRequired[] = |
| 162 "Loading extensions with 'experimental' permission requires" | 163 "Loading extensions with 'experimental' permission requires" |
| 163 " --enable-experimental-extension-apis command line flag."; | 164 " --enable-experimental-extension-apis command line flag."; |
| 164 const char kFeatureNotAllowed[] = | 165 const char kFeatureNotAllowed[] = |
| 165 "Feature '*' is not allowed in this type of manifest."; | 166 "Feature '*' is not allowed in this type of manifest."; |
| 166 const char kInvalidAllFrames[] = | 167 const char kInvalidAllFrames[] = |
| 167 "Invalid value for 'content_scripts[*].all_frames'."; | 168 "Invalid value for 'content_scripts[*].all_frames'."; |
| 168 const char kInvalidBackground[] = | 169 const char kInvalidBackground[] = |
| 169 "Invalid value for 'background_page'."; | 170 "Invalid value for 'background_page'."; |
| 171 const char kInvalidBackgroundCombination[] = |
| 172 "The background.page and background.scripts properties cannot be used at " |
| 173 "the same time."; |
| 174 const char kInvalidBackgroundScript[] = |
| 175 "Invalid value for 'background.scripts[*]'."; |
| 176 const char kInvalidBackgroundScripts[] = |
| 177 "Invalid value for 'background.scripts'."; |
| 170 const char kInvalidBackgroundInHostedApp[] = | 178 const char kInvalidBackgroundInHostedApp[] = |
| 171 "Invalid value for 'background_page'. Hosted apps must specify an " | 179 "Invalid value for 'background_page'. Hosted apps must specify an " |
| 172 "absolute HTTPS URL for the background page."; | 180 "absolute HTTPS URL for the background page."; |
| 173 const char kInvalidBrowserAction[] = | 181 const char kInvalidBrowserAction[] = |
| 174 "Invalid value for 'browser_action'."; | 182 "Invalid value for 'browser_action'."; |
| 175 const char kInvalidChromeURLOverrides[] = | 183 const char kInvalidChromeURLOverrides[] = |
| 176 "Invalid value for 'chrome_url_overrides'."; | 184 "Invalid value for 'chrome_url_overrides'."; |
| 177 const char kInvalidContentScript[] = | 185 const char kInvalidContentScript[] = |
| 178 "Invalid value for 'content_scripts[*]'."; | 186 "Invalid value for 'content_scripts[*]'."; |
| 179 const char kInvalidContentSecurityPolicy[] = | 187 const char kInvalidContentSecurityPolicy[] = |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 | 487 |
| 480 namespace extension_filenames { | 488 namespace extension_filenames { |
| 481 const char kTempExtensionName[] = "CRX_INSTALL"; | 489 const char kTempExtensionName[] = "CRX_INSTALL"; |
| 482 | 490 |
| 483 // The file to write our decoded images to, relative to the extension_path. | 491 // The file to write our decoded images to, relative to the extension_path. |
| 484 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; | 492 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; |
| 485 | 493 |
| 486 // The file to write our decoded message catalogs to, relative to the | 494 // The file to write our decoded message catalogs to, relative to the |
| 487 // extension_path. | 495 // extension_path. |
| 488 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; | 496 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; |
| 497 |
| 498 const char kGeneratedBackgroundPageFilename[] = |
| 499 "_generated_background_page.html"; |
| 489 } | 500 } |
| 490 | 501 |
| 491 namespace extension_misc { | 502 namespace extension_misc { |
| 492 const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno"; | 503 const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno"; |
| 493 const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; | 504 const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; |
| 494 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; | 505 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; |
| 495 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; | 506 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; |
| 496 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; | 507 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; |
| 497 #if defined(OS_CHROMEOS) | 508 #if defined(OS_CHROMEOS) |
| 498 const char kAccessExtensionPath[] = | 509 const char kAccessExtensionPath[] = |
| 499 "/usr/share/chromeos-assets/accessibility/extensions"; | 510 "/usr/share/chromeos-assets/accessibility/extensions"; |
| 500 const char kChromeVoxDirectoryName[] = "access_chromevox"; | 511 const char kChromeVoxDirectoryName[] = "access_chromevox"; |
| 501 #endif | 512 #endif |
| 502 | 513 |
| 503 } | 514 } |
| OLD | NEW |