Chromium Code Reviews| Index: chrome/common/extensions/api/url_overrides/url_overrides_handler.h |
| diff --git a/chrome/common/extensions/api/url_overrides/url_overrides_handler.h b/chrome/common/extensions/api/url_overrides/url_overrides_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..55a047e497b99feb1b98ba5a5d4bb2c717b937be |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/url_overrides/url_overrides_handler.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_COMMON_EXTENSIONS_API_URL_OVERRIDES_URL_OVERRIDES_HANDLER_H_ |
| +#define CHROME_COMMON_EXTENSIONS_API_URL_OVERRIDES_URL_OVERRIDES_HANDLER_H_ |
| + |
| +#include <string> |
| + |
| +#include "chrome/common/extensions/extension.h" |
| +#include "chrome/common/extensions/manifest_handler.h" |
| + |
| +namespace extensions { |
| + |
| +class Extension; |
| + |
| +struct URLOverridesInfo : public Extension::ManifestData { |
| + |
| +typedef std::map<const std::string, GURL> URLOverrideMap; |
| + |
| + // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
| + // which override the handling of those URLs. (see ExtensionOverrideUI). |
| + URLOverrideMap chrome_url_overrides_; |
| + |
| + static const URLOverrideMap GetChromeURLOverrides(const Extension* extension); |
|
Joe Thomas
2012/12/29 14:44:28
I think it's better to pass a pointer to URLOverri
Joe Thomas
2012/12/30 07:09:39
We dont need a pointer to be returned. I will make
Yoyo Zhou
2013/01/03 22:36:03
I'm not sure I understand how to use LazyInstance
Joe Thomas
2013/01/04 23:36:11
I was referring to creating a Lazy instance like b
Yoyo Zhou
2013/01/05 00:46:11
Ah, I have since commented on the other CL that I
Joe Thomas
2013/01/05 02:33:45
Done.
|
| +}; |
| + |
| +// 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_API_URL_OVERRIDES_URL_OVERRIDES_HANDLER_H_ |