Chromium Code Reviews| Index: chrome/common/extensions/manifest_url_handler.h |
| diff --git a/chrome/common/extensions/manifest_url_handler.h b/chrome/common/extensions/manifest_url_handler.h |
| index aa65e77a90fb31fcf5dd76b3e1afcc2a8ebe8afa..ef7e9a57279031a8cfa81a8050f9b95d15ec56d0 100644 |
| --- a/chrome/common/extensions/manifest_url_handler.h |
| +++ b/chrome/common/extensions/manifest_url_handler.h |
| @@ -27,6 +27,24 @@ 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 { |
| + |
|
Yoyo Zhou
2013/01/05 00:46:11
extraneous newline
Joe Thomas
2013/01/05 02:33:45
Removed
|
| + 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 +67,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_ |