summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_constants.cc
diff options
context:
space:
mode:
authorloislo@chromium.org <loislo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 11:44:57 +0000
committerloislo@chromium.org <loislo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 11:44:57 +0000
commitc082105e638a213cae0ea99b2508e0810a19c644 (patch)
tree11f0ccca1678354d38f8d2bcee05caee6e2378f4 /chrome/common/extensions/extension_constants.cc
parenta2f3b6f16f1bdea5e95be1d6e1d0e1b3b94a5df3 (diff)
downloadchromium_src-c082105e638a213cae0ea99b2508e0810a19c644.zip
chromium_src-c082105e638a213cae0ea99b2508e0810a19c644.tar.gz
chromium_src-c082105e638a213cae0ea99b2508e0810a19c644.tar.bz2
Added devtools_page field to extension manifest to specify a page loaded into devtools front-end.
Added support for enumerating devtools extensions in devtools' DOM UI. BUG=none TEST=none Review URL: http://codereview.chromium.org/3074025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_constants.cc')
-rw-r--r--chrome/common/extensions/extension_constants.cc149
1 files changed, 79 insertions, 70 deletions
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index 989d449..4001c9b 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -9,8 +9,8 @@ namespace extension_manifest_keys {
const wchar_t* kAllFrames = L"all_frames";
const wchar_t* kApp = L"app";
const wchar_t* kBackground = L"background_page";
-const wchar_t* kBrowseURLs = L"app.browse_urls";
const wchar_t* kBrowserAction = L"browser_action";
+const wchar_t* kBrowseURLs = L"app.browse_urls";
const wchar_t* kChromeURLOverrides = L"chrome_url_overrides";
const wchar_t* kContentScripts = L"content_scripts";
const wchar_t* kConvertedFromUserScript = L"converted_from_user_script";
@@ -18,6 +18,7 @@ const wchar_t* kCss = L"css";
const wchar_t* kCurrentLocale = L"current_locale";
const wchar_t* kDefaultLocale = L"default_locale";
const wchar_t* kDescription = L"description";
+const wchar_t* kDevToolsPage = L"devtools_page";
const wchar_t* kExcludeGlobs = L"exclude_globs";
const wchar_t* kIcons = L"icons";
const wchar_t* kIncludeGlobs = L"include_globs";
@@ -33,16 +34,17 @@ const wchar_t* kMatches = L"matches";
const wchar_t* kMinimumChromeVersion = L"minimum_chrome_version";
const wchar_t* kName = L"name";
const wchar_t* kOmniboxKeyword = L"omnibox_keyword";
-const wchar_t* kPageActionId = L"id";
+const wchar_t* kOptionsPage = L"options_page";
const wchar_t* kPageAction = L"page_action";
-const wchar_t* kPageActions = L"page_actions";
-const wchar_t* kPageActionIcons = L"icons";
const wchar_t* kPageActionDefaultIcon = L"default_icon";
const wchar_t* kPageActionDefaultPopup = L"default_popup";
const wchar_t* kPageActionDefaultTitle = L"default_title";
+const wchar_t* kPageActionIcons = L"icons";
+const wchar_t* kPageActionId = L"id";
const wchar_t* kPageActionPopup = L"popup";
const wchar_t* kPageActionPopupHeight = L"height";
const wchar_t* kPageActionPopupPath = L"path";
+const wchar_t* kPageActions = L"page_actions";
const wchar_t* kPermissions = L"permissions";
const wchar_t* kPlugins = L"plugins";
const wchar_t* kPluginsPath = L"path";
@@ -51,18 +53,17 @@ const wchar_t* kPublicKey = L"key";
const wchar_t* kRunAt = L"run_at";
const wchar_t* kSignature = L"signature";
const wchar_t* kTheme = L"theme";
-const wchar_t* kThemeImages = L"images";
const wchar_t* kThemeColors = L"colors";
-const wchar_t* kThemeTints = L"tints";
const wchar_t* kThemeDisplayProperties = L"properties";
+const wchar_t* kThemeImages = L"images";
+const wchar_t* kThemeTints = L"tints";
const wchar_t* kToolstripMoleHeight = L"mole_height";
const wchar_t* kToolstripMolePath = L"mole";
const wchar_t* kToolstripPath = L"path";
const wchar_t* kToolstrips = L"toolstrips";
const wchar_t* kType = L"type";
-const wchar_t* kVersion = L"version";
const wchar_t* kUpdateURL = L"update_url";
-const wchar_t* kOptionsPage = L"options_page";
+const wchar_t* kVersion = L"version";
const wchar_t* kWebURLs = L"app.urls";
} // namespace extension_manifest_keys
@@ -82,17 +83,28 @@ const char* kLaunchContainerWindow = "window";
// printf because we want to unit test them and scanf is hard to make
// cross-platform.
namespace extension_manifest_errors {
-const char* kAppsNotEnabled = "Apps are not enabled.";
+const char* kAppsNotEnabled =
+ "Apps are not enabled.";
+const char* kCannotAccessPage =
+ "Cannot access contents of url \"*\". "
+ "Extension manifest must request permission to access this host.";
+const char* kCannotScriptGallery =
+ "The extensions gallery cannot be scripted.";
const char* kChromeVersionTooLow =
"This extension requires * version * or greater.";
+const char* kDevToolsExperimental =
+ "You must request the 'experimental' permission in order to use the"
+ " DevTools API.";
const char* kInvalidAllFrames =
"Invalid value for 'content_scripts[*].all_frames'.";
+const char* kInvalidBackground =
+ "Invalid value for 'background_page'.";
+const char* kInvalidBrowserAction =
+ "Invalid value for 'browser_action'.";
const char* kInvalidBrowseURL =
"Invalid value for 'app.browse_urls[*]'.";
const char* kInvalidBrowseURLs =
"Invalid value for 'app.browse_urls'.";
-const char* kInvalidBrowserAction =
- "Invalid value for 'browser_action'.";
const char* kInvalidChromeURLOverrides =
"Invalid value for 'chrome_url_overrides'.";
const char* kInvalidContentScript =
@@ -103,20 +115,26 @@ const char* kInvalidCss =
"Invalid value for 'content_scripts[*].css[*]'.";
const char* kInvalidCssList =
"Required value 'content_scripts[*].css' is invalid.";
+const char* kInvalidDefaultLocale =
+ "Invalid value for default locale - locale name must be a string.";
const char* kInvalidDescription =
"Invalid value for 'description'.";
-const char* kInvalidGlobList =
- "Invalid value for 'content_scripts[*].*'.";
+const char* kInvalidDevToolsPage =
+ "Invalid value for 'devtools_page'.";
const char* kInvalidGlob =
"Invalid value for 'content_scripts[*].*[*]'.";
-const char* kInvalidIcons =
- "Invalid value for 'icons'.";
+const char* kInvalidGlobList =
+ "Invalid value for 'content_scripts[*].*'.";
const char* kInvalidIconPath =
"Invalid value for 'icons[\"*\"]'.";
+const char* kInvalidIcons =
+ "Invalid value for 'icons'.";
const char* kInvalidJs =
"Invalid value for 'content_scripts[*].js[*]'.";
const char* kInvalidJsList =
"Required value 'content_scripts[*].js' is invalid.";
+const char* kInvalidKey =
+ "Value 'key' is missing or invalid.";
const char* kInvalidLaunchContainer =
"Invalid value for 'app.launch.container'.";
const char* kInvalidLaunchFullscreen =
@@ -133,35 +151,33 @@ const char* kInvalidLaunchWidth =
"Invalid value for 'app.launch.width'.";
const char* kInvalidLaunchWidthContainer =
"Invalid container type for 'app.launch.width'.";
-const char* kInvalidKey =
- "Value 'key' is missing or invalid.";
const char* kInvalidManifest =
"Manifest file is invalid.";
+const char* kInvalidMatch =
+ "Invalid value for 'content_scripts[*].matches[*]'.";
const char* kInvalidMatchCount =
"Invalid value for 'content_scripts[*].matches'. There must be at least"
"one match specified.";
-const char* kInvalidMatch =
- "Invalid value for 'content_scripts[*].matches[*]'.";
const char* kInvalidMatches =
"Required value 'content_scripts[*].matches' is missing or invalid.";
const char* kInvalidMinimumChromeVersion =
"Invalid value for 'minimum_chrome_version'.";
const char* kInvalidName =
"Required value 'name' is missing or invalid.";
+const char* kInvalidOmniboxKeyword =
+ "Invalid value for 'omnibox_keyword'.";
+const char* kInvalidOptionsPage =
+ "Invalid value for 'options_page'.";
const char* kInvalidPageAction =
"Invalid value for 'page_action'.";
-const char* kInvalidPageActionName =
- "Invalid value for 'page_action.name'.";
+const char* kInvalidPageActionDefaultTitle =
+ "Invalid value for 'default_title'.";
const char* kInvalidPageActionIconPath =
"Invalid value for 'page_action.default_icon'.";
-const char* kInvalidPageActionsList =
- "Invalid value for 'page_actions'.";
-const char* kInvalidPageActionsListSize =
- "Invalid value for 'page_actions'. There can be at most one page action.";
const char* kInvalidPageActionId =
"Required value 'id' is missing or invalid.";
-const char* kInvalidPageActionDefaultTitle =
- "Invalid value for 'default_title'.";
+const char* kInvalidPageActionName =
+ "Invalid value for 'page_action.name'.";
const char* kInvalidPageActionOldAndNewKeys =
"Key \"*\" is deprecated. Key \"*\" has the same meaning. You can not "
"use both.";
@@ -171,12 +187,16 @@ const char* kInvalidPageActionPopupHeight =
"Invalid value for page action popup height [*].";
const char* kInvalidPageActionPopupPath =
"Invalid value for page action popup path [*].";
+const char* kInvalidPageActionsList =
+ "Invalid value for 'page_actions'.";
+const char* kInvalidPageActionsListSize =
+ "Invalid value for 'page_actions'. There can be at most one page action.";
const char* kInvalidPageActionTypeValue =
"Invalid value for 'page_actions[*].type', expected 'tab' or 'permanent'.";
-const char* kInvalidPermissions =
- "Required value 'permissions' is missing or invalid.";
const char* kInvalidPermission =
"Invalid value for 'permissions[*]'.";
+const char* kInvalidPermissions =
+ "Required value 'permissions' is missing or invalid.";
const char* kInvalidPermissionScheme =
"Invalid scheme for 'permissions[*]'. Only 'http' and 'https' are "
"allowed.";
@@ -186,55 +206,41 @@ const char* kInvalidPluginsPath =
"Invalid value for 'plugins[*].path'.";
const char* kInvalidPluginsPublic =
"Invalid value for 'plugins[*].public'.";
-const char* kInvalidBackground =
- "Invalid value for 'background_page'.";
const char* kInvalidRunAt =
"Invalid value for 'content_scripts[*].run_at'.";
const char* kInvalidSignature =
"Value 'signature' is missing or invalid.";
-const char* kInvalidToolstrip =
- "Invalid value for 'toolstrips[*]'";
-const char* kInvalidToolstrips =
- "Invalid value for 'toolstrips'.";
-const char* kInvalidVersion =
- "Required value 'version' is missing or invalid. It must be between 1-4 "
- "dot-separated integers each between 0 and 65536.";
-const char* kInvalidZipHash =
- "Required key 'zip_hash' is missing or invalid.";
-const char* kManifestParseError =
- "Manifest is not valid JSON.";
-const char* kManifestUnreadable =
- "Manifest file is missing or unreadable.";
-const char* kMissingFile =
- "At least one js or css file is required for 'content_scripts[*]'.";
-const char* kMultipleOverrides =
- "An extension cannot override more than one page.";
const char* kInvalidTheme =
"Invalid value for 'theme'.";
+const char* kInvalidThemeColors =
+ "Invalid value for theme colors - colors must be integers";
const char* kInvalidThemeImages =
"Invalid value for theme images - images must be strings.";
const char* kInvalidThemeImagesMissing =
- "Am image specified in the theme is missing.";
-const char* kInvalidThemeColors =
- "Invalid value for theme colors - colors must be integers";
+ "An image specified in the theme is missing.";
const char* kInvalidThemeTints =
"Invalid value for theme images - tints must be decimal numbers.";
+const char* kInvalidToolstrip =
+ "Invalid value for 'toolstrips[*]'";
+const char* kInvalidToolstrips =
+ "Invalid value for 'toolstrips'.";
const char* kInvalidUpdateURL =
"Invalid value for update url: '[*]'.";
-const char* kInvalidWebURLs =
- "Invalid value for 'app.urls'.";
+const char* kInvalidVersion =
+ "Required value 'version' is missing or invalid. It must be between 1-4 "
+ "dot-separated integers each between 0 and 65536.";
const char* kInvalidWebURL =
"Invalid value for 'app.urls[*]'.";
-const char* kInvalidDefaultLocale =
- "Invalid value for default locale - locale name must be a string.";
-const char* kOneUISurfaceOnly =
- "An extension cannot have both a page action and a browser action.";
-const char* kThemesCannotContainExtensions =
- "A theme cannot contain extensions code.";
+const char* kInvalidWebURLs =
+ "Invalid value for 'app.urls'.";
+const char* kInvalidZipHash =
+ "Required key 'zip_hash' is missing or invalid.";
const char* kLaunchPathAndURLAreExclusive =
"The 'app.launch.local_path' and 'launch.web_url' keys cannot both be set.";
const char* kLaunchURLRequired =
"Either 'app.launch.local_path' or 'app.launch.web_url' is required.";
+const char* kLocalesMessagesFileMissing =
+ "Messages file is missing for locale.";
const char* kLocalesNoDefaultLocaleSpecified =
"Localization used, but default_locale wasn't specified in the manifest.";
const char* kLocalesNoDefaultMessages =
@@ -243,20 +249,23 @@ const char* kLocalesNoValidLocaleNamesListed =
"No valid locale name could be found in _locales directory.";
const char* kLocalesTreeMissing =
"Default locale was specified, but _locales subtree is missing.";
-const char* kLocalesMessagesFileMissing =
- "Messages file is missing for locale.";
-const char* kInvalidOptionsPage =
- "Invalid value for 'options_page'.";
-const char* kReservedMessageFound =
- "Reserved key * found in message catalog.";
-const char* kCannotAccessPage = "Cannot access contents of url \"*\". "
- "Extension manifest must request permission to access this host.";
-const char* kCannotScriptGallery = "The extensions gallery cannot be scripted.";
-const char* kInvalidOmniboxKeyword =
- "Invalid value for 'omnibox_keyword'.";
+const char* kManifestParseError =
+ "Manifest is not valid JSON.";
+const char* kManifestUnreadable =
+ "Manifest file is missing or unreadable.";
+const char* kMissingFile =
+ "At least one js or css file is required for 'content_scripts[*]'.";
+const char* kMultipleOverrides =
+ "An extension cannot override more than one page.";
const char* kOmniboxExperimental =
"You must request the 'experimental' permission in order to use the"
" omnibox API.";
+const char* kOneUISurfaceOnly =
+ "An extension cannot have both a page action and a browser action.";
+const char* kReservedMessageFound =
+ "Reserved key * found in message catalog.";
+const char* kThemesCannotContainExtensions =
+ "A theme cannot contain extensions code.";
} // namespace extension_manifest_errors
namespace extension_urls {