OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "extensions/common/extension.h" | 10 #include "extensions/common/extension.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // which override the handling of those URLs. (see ExtensionOverrideUI). | 64 // which override the handling of those URLs. (see ExtensionOverrideUI). |
65 URLOverrideMap chrome_url_overrides_; | 65 URLOverrideMap chrome_url_overrides_; |
66 }; | 66 }; |
67 | 67 |
68 // Parses the "devtools_page" manifest key. | 68 // Parses the "devtools_page" manifest key. |
69 class DevToolsPageHandler : public ManifestHandler { | 69 class DevToolsPageHandler : public ManifestHandler { |
70 public: | 70 public: |
71 DevToolsPageHandler(); | 71 DevToolsPageHandler(); |
72 virtual ~DevToolsPageHandler(); | 72 virtual ~DevToolsPageHandler(); |
73 | 73 |
74 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; | 74 virtual bool Parse(Extension* extension, base::string16* error) override; |
75 | 75 |
76 private: | 76 private: |
77 virtual const std::vector<std::string> Keys() const OVERRIDE; | 77 virtual const std::vector<std::string> Keys() const override; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(DevToolsPageHandler); | 79 DISALLOW_COPY_AND_ASSIGN(DevToolsPageHandler); |
80 }; | 80 }; |
81 | 81 |
82 // Parses the "homepage_url" manifest key. | 82 // Parses the "homepage_url" manifest key. |
83 class HomepageURLHandler : public ManifestHandler { | 83 class HomepageURLHandler : public ManifestHandler { |
84 public: | 84 public: |
85 HomepageURLHandler(); | 85 HomepageURLHandler(); |
86 virtual ~HomepageURLHandler(); | 86 virtual ~HomepageURLHandler(); |
87 | 87 |
88 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; | 88 virtual bool Parse(Extension* extension, base::string16* error) override; |
89 | 89 |
90 private: | 90 private: |
91 virtual const std::vector<std::string> Keys() const OVERRIDE; | 91 virtual const std::vector<std::string> Keys() const override; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(HomepageURLHandler); | 93 DISALLOW_COPY_AND_ASSIGN(HomepageURLHandler); |
94 }; | 94 }; |
95 | 95 |
96 // Parses the "update_url" manifest key. | 96 // Parses the "update_url" manifest key. |
97 class UpdateURLHandler : public ManifestHandler { | 97 class UpdateURLHandler : public ManifestHandler { |
98 public: | 98 public: |
99 UpdateURLHandler(); | 99 UpdateURLHandler(); |
100 virtual ~UpdateURLHandler(); | 100 virtual ~UpdateURLHandler(); |
101 | 101 |
102 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; | 102 virtual bool Parse(Extension* extension, base::string16* error) override; |
103 | 103 |
104 private: | 104 private: |
105 virtual const std::vector<std::string> Keys() const OVERRIDE; | 105 virtual const std::vector<std::string> Keys() const override; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(UpdateURLHandler); | 107 DISALLOW_COPY_AND_ASSIGN(UpdateURLHandler); |
108 }; | 108 }; |
109 | 109 |
110 // Parses the "about_page" manifest key. | 110 // Parses the "about_page" manifest key. |
111 // TODO(sashab): Make this and any other similar handlers extend from the same | 111 // TODO(sashab): Make this and any other similar handlers extend from the same |
112 // abstract class, URLManifestHandler, which has pure virtual methods for | 112 // abstract class, URLManifestHandler, which has pure virtual methods for |
113 // detecting the required URL type (relative or absolute) and abstracts the | 113 // detecting the required URL type (relative or absolute) and abstracts the |
114 // URL parsing logic away. | 114 // URL parsing logic away. |
115 class AboutPageHandler : public ManifestHandler { | 115 class AboutPageHandler : public ManifestHandler { |
116 public: | 116 public: |
117 AboutPageHandler(); | 117 AboutPageHandler(); |
118 virtual ~AboutPageHandler(); | 118 virtual ~AboutPageHandler(); |
119 | 119 |
120 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; | 120 virtual bool Parse(Extension* extension, base::string16* error) override; |
121 virtual bool Validate(const Extension* extension, | 121 virtual bool Validate(const Extension* extension, |
122 std::string* error, | 122 std::string* error, |
123 std::vector<InstallWarning>* warnings) const OVERRIDE; | 123 std::vector<InstallWarning>* warnings) const override; |
124 | 124 |
125 private: | 125 private: |
126 virtual const std::vector<std::string> Keys() const OVERRIDE; | 126 virtual const std::vector<std::string> Keys() const override; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); | 128 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); |
129 }; | 129 }; |
130 | 130 |
131 // Parses the "chrome_url_overrides" manifest key. | 131 // Parses the "chrome_url_overrides" manifest key. |
132 class URLOverridesHandler : public ManifestHandler { | 132 class URLOverridesHandler : public ManifestHandler { |
133 public: | 133 public: |
134 URLOverridesHandler(); | 134 URLOverridesHandler(); |
135 virtual ~URLOverridesHandler(); | 135 virtual ~URLOverridesHandler(); |
136 | 136 |
137 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; | 137 virtual bool Parse(Extension* extension, base::string16* error) override; |
138 | 138 |
139 private: | 139 private: |
140 virtual const std::vector<std::string> Keys() const OVERRIDE; | 140 virtual const std::vector<std::string> Keys() const override; |
141 | 141 |
142 DISALLOW_COPY_AND_ASSIGN(URLOverridesHandler); | 142 DISALLOW_COPY_AND_ASSIGN(URLOverridesHandler); |
143 }; | 143 }; |
144 | 144 |
145 } // namespace extensions | 145 } // namespace extensions |
146 | 146 |
147 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ | 147 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ |
OLD | NEW |