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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // otherwise modified, or an application default. | 254 // otherwise modified, or an application default. |
255 virtual SkBitmap* LoadThemeBitmap(int id); | 255 virtual SkBitmap* LoadThemeBitmap(int id); |
256 | 256 |
257 // Save the modified bitmap at image_cache_[id]. | 257 // Save the modified bitmap at image_cache_[id]. |
258 virtual void SaveThemeBitmap(std::string resource_name, int id); | 258 virtual void SaveThemeBitmap(std::string resource_name, int id); |
259 | 259 |
260 // Clears the platform-specific caches. Do not call directly; it's called | 260 // Clears the platform-specific caches. Do not call directly; it's called |
261 // from ClearCaches(). | 261 // from ClearCaches(). |
262 virtual void FreePlatformCaches(); | 262 virtual void FreePlatformCaches(); |
263 | 263 |
| 264 // The implementation of GenerateTabBackgroundBitmap(). That function also |
| 265 // must be locked and touches caches; this function only deals with image |
| 266 // generation. |
| 267 SkBitmap* GenerateTabBackgroundBitmapImpl(int id); |
| 268 |
264 Profile* profile() { return profile_; } | 269 Profile* profile() { return profile_; } |
265 | 270 |
266 // Subclasses may need us to not use the on-disk image cache. The GTK | 271 // Subclasses may need us to not use the on-disk image cache. The GTK |
267 // interface needs to generate some images itself. | 272 // interface needs to generate some images itself. |
268 void force_process_images() { process_images_ = true; } | 273 void force_process_images() { process_images_ = true; } |
269 | 274 |
270 private: | 275 private: |
271 typedef std::map<const int, std::string> ImageMap; | 276 typedef std::map<const int, std::string> ImageMap; |
272 typedef std::map<const std::string, SkColor> ColorMap; | 277 typedef std::map<const std::string, SkColor> ColorMap; |
273 typedef std::map<const std::string, color_utils::HSL> TintMap; | 278 typedef std::map<const std::string, color_utils::HSL> TintMap; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // If true, process all images; if false, just load from disk. | 382 // If true, process all images; if false, just load from disk. |
378 bool process_images_; | 383 bool process_images_; |
379 | 384 |
380 // Where we will store our generated images. | 385 // Where we will store our generated images. |
381 FilePath image_dir_; | 386 FilePath image_dir_; |
382 | 387 |
383 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); | 388 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); |
384 }; | 389 }; |
385 | 390 |
386 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ | 391 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ |
OLD | NEW |