| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 const char kExpectString[] = "Expect string value."; | 165 const char kExpectString[] = "Expect string value."; |
| 165 const char kExperimentalFlagRequired[] = | 166 const char kExperimentalFlagRequired[] = |
| 166 "Loading extensions with 'experimental' permission requires" | 167 "Loading extensions with 'experimental' permission requires" |
| 167 " --enable-experimental-extension-apis command line flag."; | 168 " --enable-experimental-extension-apis command line flag."; |
| 168 const char kFeatureNotAllowed[] = | 169 const char kFeatureNotAllowed[] = |
| 169 "Feature '*' is not allowed in this type of manifest."; | 170 "Feature '*' is not allowed in this type of manifest."; |
| 170 const char kInvalidAllFrames[] = | 171 const char kInvalidAllFrames[] = |
| 171 "Invalid value for 'content_scripts[*].all_frames'."; | 172 "Invalid value for 'content_scripts[*].all_frames'."; |
| 172 const char kInvalidBackground[] = | 173 const char kInvalidBackground[] = |
| 173 "Invalid value for 'background_page'."; | 174 "Invalid value for 'background_page'."; |
| 175 const char kInvalidBackgroundScript[] = |
| 176 "Invalid value for 'background.scripts[*]'."; |
| 177 const char kInvalidBackgroundScripts[] = |
| 178 "Invalid value for 'background.scripts'."; |
| 174 const char kInvalidBackgroundInHostedApp[] = | 179 const char kInvalidBackgroundInHostedApp[] = |
| 175 "Invalid value for 'background_page'. Hosted apps must specify an " | 180 "Invalid value for 'background_page'. Hosted apps must specify an " |
| 176 "absolute HTTPS URL for the background page."; | 181 "absolute HTTPS URL for the background page."; |
| 177 const char kInvalidBrowserAction[] = | 182 const char kInvalidBrowserAction[] = |
| 178 "Invalid value for 'browser_action'."; | 183 "Invalid value for 'browser_action'."; |
| 179 const char kInvalidChromeURLOverrides[] = | 184 const char kInvalidChromeURLOverrides[] = |
| 180 "Invalid value for 'chrome_url_overrides'."; | 185 "Invalid value for 'chrome_url_overrides'."; |
| 181 const char kInvalidContentScript[] = | 186 const char kInvalidContentScript[] = |
| 182 "Invalid value for 'content_scripts[*]'."; | 187 "Invalid value for 'content_scripts[*]'."; |
| 183 const char kInvalidContentSecurityPolicy[] = | 188 const char kInvalidContentSecurityPolicy[] = |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 499 |
| 495 namespace extension_filenames { | 500 namespace extension_filenames { |
| 496 const char kTempExtensionName[] = "CRX_INSTALL"; | 501 const char kTempExtensionName[] = "CRX_INSTALL"; |
| 497 | 502 |
| 498 // The file to write our decoded images to, relative to the extension_path. | 503 // The file to write our decoded images to, relative to the extension_path. |
| 499 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; | 504 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; |
| 500 | 505 |
| 501 // The file to write our decoded message catalogs to, relative to the | 506 // The file to write our decoded message catalogs to, relative to the |
| 502 // extension_path. | 507 // extension_path. |
| 503 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; | 508 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; |
| 509 |
| 510 const char kGeneratedBackgroundPageFilename[] = |
| 511 "_generated_background_page.html"; |
| 504 } | 512 } |
| 505 | 513 |
| 506 namespace extension_misc { | 514 namespace extension_misc { |
| 507 const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno"; | 515 const char kBookmarkManagerId[] = "eemcgdkfndhakfknompkggombfjjjeno"; |
| 508 const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; | 516 const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; |
| 509 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; | 517 const char kCloudPrintAppId[] = "mfehgcgbbipciphmccgaenjidiccnmng"; |
| 510 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; | 518 const char kAppsPromoHistogram[] = "Extensions.AppsPromo"; |
| 511 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; | 519 const char kAppLaunchHistogram[] = "Extensions.AppLaunch"; |
| 512 #if defined(OS_CHROMEOS) | 520 #if defined(OS_CHROMEOS) |
| 513 const char kAccessExtensionPath[] = | 521 const char kAccessExtensionPath[] = |
| 514 "/usr/share/chromeos-assets/accessibility/extensions"; | 522 "/usr/share/chromeos-assets/accessibility/extensions"; |
| 515 const char kChromeVoxDirectoryName[] = "access_chromevox"; | 523 const char kChromeVoxDirectoryName[] = "access_chromevox"; |
| 516 #endif | 524 #endif |
| 517 | 525 |
| 518 } | 526 } |
| OLD | NEW |