Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_API_URL_OVERRIDES_URL_OVERRIDES_HANDLER_H_ | |
| 6 #define CHROME_COMMON_EXTENSIONS_API_URL_OVERRIDES_URL_OVERRIDES_HANDLER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "chrome/common/extensions/extension.h" | |
| 11 #include "chrome/common/extensions/manifest_handler.h" | |
| 12 | |
| 13 namespace extensions { | |
| 14 | |
| 15 class Extension; | |
| 16 | |
| 17 struct URLOverridesInfo : public Extension::ManifestData { | |
| 18 | |
| 19 typedef std::map<const std::string, GURL> URLOverrideMap; | |
| 20 | |
| 21 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | |
| 22 // which override the handling of those URLs. (see ExtensionOverrideUI). | |
| 23 URLOverrideMap chrome_url_overrides_; | |
| 24 | |
| 25 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.
| |
| 26 }; | |
| 27 | |
| 28 // Parses the "chrome_url_overrides" manifest key. | |
| 29 class URLOverridesHandler : public ManifestHandler { | |
| 30 public: | |
| 31 URLOverridesHandler(); | |
| 32 virtual ~URLOverridesHandler(); | |
| 33 | |
| 34 virtual bool Parse(const base::Value* value, | |
| 35 Extension* extension, | |
| 36 string16* error) OVERRIDE; | |
| 37 }; | |
| 38 | |
| 39 } // namespace extensions | |
| 40 | |
| 41 #endif // CHROME_COMMON_EXTENSIONS_API_URL_OVERRIDES_URL_OVERRIDES_HANDLER_H_ | |
| OLD | NEW |