| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BROWSER_BROWSER_THEME_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ | 6 #define CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 virtual void LoadThemePrefs(); | 233 virtual void LoadThemePrefs(); |
| 234 | 234 |
| 235 // Let all the browser views know that themes have changed. | 235 // Let all the browser views know that themes have changed. |
| 236 virtual void NotifyThemeChanged(); | 236 virtual void NotifyThemeChanged(); |
| 237 | 237 |
| 238 // Loads a bitmap from the theme, which may be tinted or | 238 // Loads a bitmap from the theme, which may be tinted or |
| 239 // otherwise modified, or an application default. | 239 // otherwise modified, or an application default. |
| 240 virtual SkBitmap* LoadThemeBitmap(int id); | 240 virtual SkBitmap* LoadThemeBitmap(int id); |
| 241 | 241 |
| 242 // Save the modified bitmap at image_cache_[id]. | 242 // Save the modified bitmap at image_cache_[id]. |
| 243 virtual void SaveThemeBitmap(const std::string resource_name, int id); | 243 virtual void SaveThemeBitmap(std::string resource_name, int id); |
| 244 | 244 |
| 245 Profile* profile() { return profile_; } | 245 Profile* profile() { return profile_; } |
| 246 | 246 |
| 247 // Subclasses may need us to not use the on-disk image cache. The GTK | 247 // Subclasses may need us to not use the on-disk image cache. The GTK |
| 248 // interface needs to generate some images itself. | 248 // interface needs to generate some images itself. |
| 249 void force_process_images() { process_images_ = true; } | 249 void force_process_images() { process_images_ = true; } |
| 250 | 250 |
| 251 private: | 251 private: |
| 252 typedef std::map<const int, std::string> ImageMap; | 252 typedef std::map<const int, std::string> ImageMap; |
| 253 typedef std::map<const std::string, SkColor> ColorMap; | 253 typedef std::map<const std::string, SkColor> ColorMap; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // If true, process all images; if false, just load from disk. | 361 // If true, process all images; if false, just load from disk. |
| 362 bool process_images_; | 362 bool process_images_; |
| 363 | 363 |
| 364 // Where we will store our generated images. | 364 // Where we will store our generated images. |
| 365 FilePath image_dir_; | 365 FilePath image_dir_; |
| 366 | 366 |
| 367 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); | 367 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); |
| 368 }; | 368 }; |
| 369 | 369 |
| 370 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ | 370 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ |
| OLD | NEW |