| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 Icons icon_size, | 206 Icons icon_size, |
| 207 scoped_ptr<SkBitmap>* result); | 207 scoped_ptr<SkBitmap>* result); |
| 208 | 208 |
| 209 // Returns the base extension url for a given |extension_id|. | 209 // Returns the base extension url for a given |extension_id|. |
| 210 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); | 210 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); |
| 211 | 211 |
| 212 // Returns whether the browser has apps enabled (either as the default or if | 212 // Returns whether the browser has apps enabled (either as the default or if |
| 213 // it was explictly turned on via a command line switch). | 213 // it was explictly turned on via a command line switch). |
| 214 static bool AppsAreEnabled(); | 214 static bool AppsAreEnabled(); |
| 215 | 215 |
| 216 // Returns the url prefix for the extension/apps gallery. Can be set via the |
| 217 // --apps-gallery-url switch. |
| 218 static std::string ChromeStoreURL(); |
| 219 |
| 216 // Initialize the extension from a parsed manifest. | 220 // Initialize the extension from a parsed manifest. |
| 217 // Usually, the id of an extension is generated by the "key" property of | 221 // Usually, the id of an extension is generated by the "key" property of |
| 218 // its manifest, but if |require_key| is |false|, a temporary ID will be | 222 // its manifest, but if |require_key| is |false|, a temporary ID will be |
| 219 // generated based on the path. | 223 // generated based on the path. |
| 220 bool InitFromValue(const DictionaryValue& value, bool require_key, | 224 bool InitFromValue(const DictionaryValue& value, bool require_key, |
| 221 std::string* error); | 225 std::string* error); |
| 222 | 226 |
| 223 const FilePath& path() const { return path_; } | 227 const FilePath& path() const { return path_; } |
| 224 void set_path(const FilePath& path) { path_ = path; } | 228 void set_path(const FilePath& path) { path_ = path; } |
| 225 const GURL& url() const { return extension_url_; } | 229 const GURL& url() const { return extension_url_; } |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 scoped_ptr<DictionaryValue> extension_manifest; | 574 scoped_ptr<DictionaryValue> extension_manifest; |
| 571 std::string extension_id; | 575 std::string extension_id; |
| 572 FilePath extension_path; | 576 FilePath extension_path; |
| 573 Extension::Location extension_location; | 577 Extension::Location extension_location; |
| 574 | 578 |
| 575 private: | 579 private: |
| 576 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); | 580 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); |
| 577 }; | 581 }; |
| 578 | 582 |
| 579 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 583 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |