| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 // Save the paths of data we have written to disk in prefs. | 330 // Save the paths of data we have written to disk in prefs. |
| 331 void SaveCachedImageData() const; | 331 void SaveCachedImageData() const; |
| 332 | 332 |
| 333 // Save the id of the last theme installed. | 333 // Save the id of the last theme installed. |
| 334 void SaveThemeID(const std::string& id); | 334 void SaveThemeID(const std::string& id); |
| 335 | 335 |
| 336 // Frees generated images and clears the image cache. | 336 // Frees generated images and clears the image cache. |
| 337 void ClearCaches(); | 337 void ClearCaches(); |
| 338 | 338 |
| 339 // Remove preference values for themes that are no longer in use. |
| 340 void RemoveUnusedThemes(); |
| 341 |
| 339 // Encode image at image_cache_[id] as PNG and write to disk. | 342 // Encode image at image_cache_[id] as PNG and write to disk. |
| 340 void WriteImagesToDisk() const; | 343 void WriteImagesToDisk() const; |
| 341 | 344 |
| 342 // Do we have a custom frame image or custom tints? | 345 // Do we have a custom frame image or custom tints? |
| 343 bool ShouldTintFrames() const; | 346 bool ShouldTintFrames() const; |
| 344 | 347 |
| 345 #if defined(OS_LINUX) | 348 #if defined(OS_LINUX) |
| 346 // Loads an image and flips it horizontally if |rtl_enabled| is true. | 349 // Loads an image and flips it horizontally if |rtl_enabled| is true. |
| 347 GdkPixbuf* GetPixbufImpl(int id, bool rtl_enabled) const; | 350 GdkPixbuf* GetPixbufImpl(int id, bool rtl_enabled) const; |
| 348 #endif | 351 #endif |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // If true, process all images; if false, just load from disk. | 385 // If true, process all images; if false, just load from disk. |
| 383 bool process_images_; | 386 bool process_images_; |
| 384 | 387 |
| 385 // Where we will store our generated images. | 388 // Where we will store our generated images. |
| 386 FilePath image_dir_; | 389 FilePath image_dir_; |
| 387 | 390 |
| 388 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); | 391 DISALLOW_COPY_AND_ASSIGN(BrowserThemeProvider); |
| 389 }; | 392 }; |
| 390 | 393 |
| 391 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ | 394 #endif // CHROME_BROWSER_BROWSER_THEME_PROVIDER_H_ |
| OLD | NEW |