Chromium Code Reviews| Index: chrome/browser/extensions/extension.h | 
| =================================================================== | 
| --- chrome/browser/extensions/extension.h (revision 10888) | 
| +++ chrome/browser/extensions/extension.h (working copy) | 
| @@ -21,6 +21,7 @@ | 
| public: | 
| Extension() {} | 
| explicit Extension(const FilePath& path); | 
| + explicit Extension(const Extension& path); | 
| // The format for extension manifests that this code understands. | 
| static const unsigned int kExpectedFormatVersion = 1; | 
| @@ -40,6 +41,7 @@ | 
| static const wchar_t* kVersionKey; | 
| static const wchar_t* kZipHashKey; | 
| static const wchar_t* kPluginsDirKey; | 
| + static const wchar_t* kThemeKey; | 
| // Some values expected in manifests. | 
| static const char* kRunAtDocumentStartValue; | 
| @@ -67,7 +69,7 @@ | 
| // The number of bytes in a legal id. | 
| static const size_t kIdSize; | 
| - // Creates an absolute url to a resource inside an extension. The | 
| + // Returns an absolute url to a resource inside of an extension. The | 
| // |extension_url| argument should be the url() from an Extension object. The | 
| // |relative_path| can be untrusted user input. The returned URL will either | 
| // be invalid() or a child of |extension_url|. | 
| @@ -75,7 +77,7 @@ | 
| static GURL GetResourceURL(const GURL& extension_url, | 
| const std::string& relative_path); | 
| - // Creates an absolute path to a resource inside an extension. The | 
| + // Returns an absolute path to a resource inside of an extension. The | 
| // |extension_path| argument should be the path() from an Extension object. | 
| // The |relative_path| can be untrusted user input. The returned path will | 
| // either be empty or a child of extension_path. | 
| @@ -83,6 +85,13 @@ | 
| static FilePath GetResourcePath(const FilePath& extension_path, | 
| const std::string& relative_path); | 
| + // Returns an absolute path to a resource inside of an extension if the | 
| + // extension has a theme defined with the given |resource_id|. Otherwise | 
| + // the path will be empty. Note that this method is not static as it is | 
| + // only intended to be called on an extension which has registered itself | 
| + // as providing a theme. | 
| + FilePath GetThemeResourcePath(const int resource_id); | 
| + | 
| // The path to the folder the extension is stored in. | 
| const FilePath& path() const { return path_; } | 
| @@ -98,7 +107,7 @@ | 
| const std::string& id() const { return id_; } | 
| // The version number for the extension. | 
| - const Version* version() const { return version_.get(); } | 
| + Version* version() const { return version_.get(); } | 
| 
 
Aaron Boodman
2009/03/04 20:19:27
Did you mean to change this to a mutable instance?
 
Erik does not do reviews
2009/03/04 20:21:55
nope, good catch.  fixed and committing (when the
 
 | 
| // String representation of the version number. | 
| const std::string VersionString() const; | 
| @@ -152,7 +161,11 @@ | 
| // will not have this key. | 
| std::string zip_hash_; | 
| - DISALLOW_COPY_AND_ASSIGN(Extension); | 
| + // A map of resource id's to relative file paths. | 
| + std::map<const std::wstring, std::string> theme_paths_; | 
| + | 
| + // We implement copy, but not assign. | 
| + void operator=(const Extension&); | 
| }; | 
| #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ |