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_MANIFEST_URL_HANDLER_H_ | |
| 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_URL_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 // A structure to hold various URLs(devtools_page, homepage_url, etc) | |
|
Yoyo Zhou
2013/01/04 00:39:04
You can just delete this parenthetical. (But in th
| |
| 16 // that may be specified in the manifest of an extension. | |
| 17 struct ManifestURL : public Extension::ManifestData { | |
| 18 GURL url_; | |
| 19 | |
| 20 // Returns the DevTools Page for this extension. | |
| 21 static const GURL& GetDevToolsPage(const Extension* extension); | |
| 22 | |
| 23 // Returns the Homepage URL for this extension. | |
| 24 // If homepage_url was not specified in the manifest, | |
| 25 // this returns the Google Gallery URL. For third-party extensions, | |
| 26 // this returns a blank GURL. | |
| 27 static const GURL GetHomepageURL(const Extension* extension); | |
| 28 }; | |
| 29 | |
| 30 // Parses the "devtools_page" manifest key. | |
| 31 class DevToolsPageHandler : public ManifestHandler { | |
| 32 public: | |
| 33 DevToolsPageHandler(); | |
| 34 virtual ~DevToolsPageHandler(); | |
| 35 | |
| 36 virtual bool Parse(const base::Value* value, | |
| 37 Extension* extension, | |
| 38 string16* error) OVERRIDE; | |
| 39 }; | |
| 40 | |
| 41 // Parses the "homepage_url" manifest key. | |
| 42 class HomepageURLHandler : public ManifestHandler { | |
| 43 public: | |
| 44 HomepageURLHandler(); | |
| 45 virtual ~HomepageURLHandler(); | |
| 46 | |
| 47 virtual bool Parse(const base::Value* value, | |
| 48 Extension* extension, | |
| 49 string16* error) OVERRIDE; | |
| 50 }; | |
| 51 | |
| 52 } // namespace extensions | |
| 53 | |
| 54 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_URL_HANDLER_H_ | |
| OLD | NEW |