Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/common/extensions/manifest_url_handler.h

Issue 311193005: Add the about_page key to shared_module manifest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change the dialog Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 22 matching lines...) Expand all
33 // Returns the Update URL for this extension. 33 // Returns the Update URL for this extension.
34 static const GURL& GetUpdateURL(const Extension* extension); 34 static const GURL& GetUpdateURL(const Extension* extension);
35 35
36 // Returns true if this extension's update URL is the extension gallery. 36 // Returns true if this extension's update URL is the extension gallery.
37 static bool UpdatesFromGallery(const Extension* extension); 37 static bool UpdatesFromGallery(const Extension* extension);
38 static bool UpdatesFromGallery(const base::DictionaryValue* manifest); 38 static bool UpdatesFromGallery(const base::DictionaryValue* manifest);
39 39
40 // Returns the Options Page for this extension. 40 // Returns the Options Page for this extension.
41 static const GURL& GetOptionsPage(const Extension* extension); 41 static const GURL& GetOptionsPage(const Extension* extension);
42 42
43 // Returns the About Page for this extension.
44 static const GURL& GetAboutPage(const Extension* extension);
45
43 // Returns the webstore page URL for this extension. 46 // Returns the webstore page URL for this extension.
44 static const GURL GetDetailsURL(const Extension* extension); 47 static const GURL GetDetailsURL(const Extension* extension);
45 }; 48 };
46 49
47 // A structure to hold the chrome URL overrides that may be specified 50 // A structure to hold the chrome URL overrides that may be specified
48 // in the manifest of an extension. 51 // in the manifest of an extension.
49 struct URLOverrides : public Extension::ManifestData { 52 struct URLOverrides : public Extension::ManifestData {
50 typedef std::map<const std::string, GURL> URLOverrideMap; 53 typedef std::map<const std::string, GURL> URLOverrideMap;
51 54
52 // Define out of line constructor/destructor to please Clang. 55 // Define out of line constructor/destructor to please Clang.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual bool Validate(const Extension* extension, 116 virtual bool Validate(const Extension* extension,
114 std::string* error, 117 std::string* error,
115 std::vector<InstallWarning>* warnings) const OVERRIDE; 118 std::vector<InstallWarning>* warnings) const OVERRIDE;
116 119
117 private: 120 private:
118 virtual const std::vector<std::string> Keys() const OVERRIDE; 121 virtual const std::vector<std::string> Keys() const OVERRIDE;
119 122
120 DISALLOW_COPY_AND_ASSIGN(OptionsPageHandler); 123 DISALLOW_COPY_AND_ASSIGN(OptionsPageHandler);
121 }; 124 };
122 125
126 // Parses the "options_page" manifest key.
127 class AboutPageHandler : public ManifestHandler {
128 public:
129 AboutPageHandler();
130 virtual ~AboutPageHandler();
131
132 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE;
133 virtual bool Validate(const Extension* extension,
benwells 2014/06/05 03:59:17 Do you know what calls this? It is weird that it u
sashab 2014/06/10 05:44:13 Not sure what calls it (there are a lot of callsit
Yoyo Zhou 2014/06/10 11:16:18 This is principally called from extensions::file_u
134 std::string* error,
135 std::vector<InstallWarning>* warnings) const OVERRIDE;
136
137 private:
138 virtual const std::vector<std::string> Keys() const OVERRIDE;
139
140 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler);
141 };
142
123 // Parses the "chrome_url_overrides" manifest key. 143 // Parses the "chrome_url_overrides" manifest key.
124 class URLOverridesHandler : public ManifestHandler { 144 class URLOverridesHandler : public ManifestHandler {
125 public: 145 public:
126 URLOverridesHandler(); 146 URLOverridesHandler();
127 virtual ~URLOverridesHandler(); 147 virtual ~URLOverridesHandler();
128 148
129 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; 149 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE;
130 150
131 private: 151 private:
132 virtual const std::vector<std::string> Keys() const OVERRIDE; 152 virtual const std::vector<std::string> Keys() const OVERRIDE;
133 153
134 DISALLOW_COPY_AND_ASSIGN(URLOverridesHandler); 154 DISALLOW_COPY_AND_ASSIGN(URLOverridesHandler);
135 }; 155 };
136 156
137 } // namespace extensions 157 } // namespace extensions
138 158
139 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ 159 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698