diff options
author | MHX348@motorola.com <MHX348@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-12 15:58:00 +0000 |
---|---|---|
committer | MHX348@motorola.com <MHX348@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-12 15:58:00 +0000 |
commit | 636ee43284f75156541540698d89df1227ff3b12 (patch) | |
tree | e1ce6a8b2ccbb1cb085fe9a2ceb4231ff0c2c9df /chrome/common/extensions/manifest_url_handler.h | |
parent | cf33d4266856b04d59c67a536cb93374a7b7f509 (diff) | |
download | chromium_src-636ee43284f75156541540698d89df1227ff3b12.zip chromium_src-636ee43284f75156541540698d89df1227ff3b12.tar.gz chromium_src-636ee43284f75156541540698d89df1227ff3b12.tar.bz2 |
Move the parsing of "chrome_url_overrides" out of Extension.
Moved a bunch of stuff out of ExtensionService.
This CL depends on https://chromiumcodereview.appspot.com/11624036/
Patch from Joe Thomas <mhx348@motorola.com>.
BUG=159265
Review URL: https://chromiumcodereview.appspot.com/11660016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/manifest_url_handler.h')
-rw-r--r-- | chrome/common/extensions/manifest_url_handler.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chrome/common/extensions/manifest_url_handler.h b/chrome/common/extensions/manifest_url_handler.h index aa65e77..befb510 100644 --- a/chrome/common/extensions/manifest_url_handler.h +++ b/chrome/common/extensions/manifest_url_handler.h @@ -27,6 +27,23 @@ struct ManifestURL : public Extension::ManifestData { static const GURL GetHomepageURL(const Extension* extension); }; +// A structure to hold the chrome URL overrides that may be specified +// in the manifest of an extension. +struct URLOverrides : public Extension::ManifestData { + typedef std::map<const std::string, GURL> URLOverrideMap; + + // Define out of line constructor/destructor to please Clang. + URLOverrides(); + virtual ~URLOverrides(); + + static const URLOverrideMap& + GetChromeURLOverrides(const Extension* extension); + + // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs + // which override the handling of those URLs. (see ExtensionOverrideUI). + URLOverrideMap chrome_url_overrides_; +}; + // Parses the "devtools_page" manifest key. class DevToolsPageHandler : public ManifestHandler { public: @@ -49,6 +66,17 @@ class HomepageURLHandler : public ManifestHandler { string16* error) OVERRIDE; }; +// Parses the "chrome_url_overrides" manifest key. +class URLOverridesHandler : public ManifestHandler { + public: + URLOverridesHandler(); + virtual ~URLOverridesHandler(); + + virtual bool Parse(const base::Value* value, + Extension* extension, + string16* error) OVERRIDE; +}; + } // namespace extensions #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ |