| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // Frees generated images and clears the image cache. | 301 // Frees generated images and clears the image cache. |
| 302 void ClearCaches(); | 302 void ClearCaches(); |
| 303 | 303 |
| 304 // Clears the platform-specific caches. Do not call directly; it's called | 304 // Clears the platform-specific caches. Do not call directly; it's called |
| 305 // from ClearCaches(). | 305 // from ClearCaches(). |
| 306 void FreePlatformCaches(); | 306 void FreePlatformCaches(); |
| 307 | 307 |
| 308 // Encode image at image_cache_[id] as PNG and write to disk. | 308 // Encode image at image_cache_[id] as PNG and write to disk. |
| 309 void WriteImagesToDisk(); | 309 void WriteImagesToDisk(); |
| 310 | 310 |
| 311 // Do we have a custom frame image or custom tints? |
| 312 bool ShouldTintFrames(); |
| 313 |
| 311 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) | 314 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) |
| 312 // Loads an image and flips it horizontally if |rtl_enabled| is true. | 315 // Loads an image and flips it horizontally if |rtl_enabled| is true. |
| 313 GdkPixbuf* GetPixbufImpl(int id, bool rtl_enabled); | 316 GdkPixbuf* GetPixbufImpl(int id, bool rtl_enabled); |
| 314 #endif | 317 #endif |
| 315 | 318 |
| 316 // Cached images. We cache all retrieved and generated bitmaps and keep | 319 // Cached images. We cache all retrieved and generated bitmaps and keep |
| 317 // track of the pointers. We own these and will delete them when we're done | 320 // track of the pointers. We own these and will delete them when we're done |
| 318 // using them. | 321 // using them. |
| 319 typedef std::map<int, SkBitmap*> ImageCache; | 322 typedef std::map<int, SkBitmap*> ImageCache; |
| 320 ImageCache image_cache_; | 323 ImageCache image_cache_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 348 // If true, process all images; if false, just load from disk. | 351 // If true, process all images; if false, just load from disk. |
| 349 bool process_images_; | 352 bool process_images_; |
| 350 | 353 |
| 351 // Where we will store our generated images. | 354 // Where we will store our generated images. |
| 352 FilePath image_dir_; | 355 FilePath image_dir_; |
| 353 | 356 |
| 354 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); | 357 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); |
| 355 }; | 358 }; |
| 356 | 359 |
| 357 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ | 360 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ |
| OLD | NEW |