| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_GTK_GTK_THEME_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Whether we use the GTK theme by default in the current desktop | 153 // Whether we use the GTK theme by default in the current desktop |
| 154 // environment. Returns true when we GTK defaults to on. | 154 // environment. Returns true when we GTK defaults to on. |
| 155 static bool DefaultUsesSystemTheme(); | 155 static bool DefaultUsesSystemTheme(); |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 typedef std::map<int, SkColor> ColorMap; | 158 typedef std::map<int, SkColor> ColorMap; |
| 159 typedef std::map<int, color_utils::HSL> TintMap; | 159 typedef std::map<int, color_utils::HSL> TintMap; |
| 160 typedef std::map<int, gfx::Image*> ImageCache; | 160 typedef std::map<int, gfx::Image*> ImageCache; |
| 161 | 161 |
| 162 // Clears all the GTK color overrides. | |
| 163 virtual void ClearAllThemeData() OVERRIDE; | |
| 164 | |
| 165 // Load theme data from preferences, possibly picking colors from GTK. | 162 // Load theme data from preferences, possibly picking colors from GTK. |
| 166 virtual void LoadThemePrefs() OVERRIDE; | 163 virtual void LoadThemePrefs() OVERRIDE; |
| 167 | 164 |
| 168 // Let all the browser views know that themes have changed. | 165 // Let all the browser views know that themes have changed. |
| 169 virtual void NotifyThemeChanged() OVERRIDE; | 166 virtual void NotifyThemeChanged() OVERRIDE; |
| 170 | 167 |
| 171 // Additionally frees the CairoCachedSurfaces. | 168 // Additionally frees the CairoCachedSurfaces. |
| 172 virtual void FreePlatformCaches() OVERRIDE; | 169 virtual void FreePlatformCaches() OVERRIDE; |
| 173 | 170 |
| 174 // Gets the name of the current icon theme and passes it to our low level XDG | 171 // Gets the name of the current icon theme and passes it to our low level XDG |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 307 |
| 311 // The default folder icon and default bookmark icon for the GTK theme. | 308 // The default folder icon and default bookmark icon for the GTK theme. |
| 312 // These are static because the system can only have one theme at a time. | 309 // These are static because the system can only have one theme at a time. |
| 313 // They are cached when they are requested the first time, and cleared when | 310 // They are cached when they are requested the first time, and cleared when |
| 314 // the system theme changes. | 311 // the system theme changes. |
| 315 static base::LazyInstance<gfx::Image> default_folder_icon_; | 312 static base::LazyInstance<gfx::Image> default_folder_icon_; |
| 316 static base::LazyInstance<gfx::Image> default_bookmark_icon_; | 313 static base::LazyInstance<gfx::Image> default_bookmark_icon_; |
| 317 }; | 314 }; |
| 318 | 315 |
| 319 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 316 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
| OLD | NEW |