OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GTK_GTK_THEME_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
6 #define CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 6 #define CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 typedef std::map<int, color_utils::HSL> TintMap; | 112 typedef std::map<int, color_utils::HSL> TintMap; |
113 typedef std::map<int, SkBitmap*> ImageCache; | 113 typedef std::map<int, SkBitmap*> ImageCache; |
114 | 114 |
115 // Clears all the GTK color overrides. | 115 // Clears all the GTK color overrides. |
116 virtual void ClearAllThemeData(); | 116 virtual void ClearAllThemeData(); |
117 | 117 |
118 // Load theme data from preferences, possibly picking colors from GTK. | 118 // Load theme data from preferences, possibly picking colors from GTK. |
119 virtual void LoadThemePrefs(); | 119 virtual void LoadThemePrefs(); |
120 | 120 |
121 // Let all the browser views know that themes have changed. | 121 // Let all the browser views know that themes have changed. |
122 virtual void NotifyThemeChanged(); | 122 virtual void NotifyThemeChanged(Extension* extension); |
123 | 123 |
124 // Additionally frees the CairoCachedSurfaces. | 124 // Additionally frees the CairoCachedSurfaces. |
125 virtual void FreePlatformCaches(); | 125 virtual void FreePlatformCaches(); |
126 | 126 |
127 // Handles signal from GTK that our theme has been changed. | 127 // Handles signal from GTK that our theme has been changed. |
128 static void OnStyleSet(GtkWidget* widget, | 128 static void OnStyleSet(GtkWidget* widget, |
129 GtkStyle* previous_style, | 129 GtkStyle* previous_style, |
130 GtkThemeProvider* provider); | 130 GtkThemeProvider* provider); |
131 | 131 |
132 // Extracts colors and tints from the GTK theme, both for the | 132 // Extracts colors and tints from the GTK theme, both for the |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 // The default folder icon and default bookmark icon for the GTK theme. | 209 // The default folder icon and default bookmark icon for the GTK theme. |
210 // These are static because the system can only have one theme at a time. | 210 // These are static because the system can only have one theme at a time. |
211 // They are cached when they are requested the first time, and cleared when | 211 // They are cached when they are requested the first time, and cleared when |
212 // the system theme changes. | 212 // the system theme changes. |
213 static GdkPixbuf* default_folder_icon_; | 213 static GdkPixbuf* default_folder_icon_; |
214 static GdkPixbuf* default_bookmark_icon_; | 214 static GdkPixbuf* default_bookmark_icon_; |
215 }; | 215 }; |
216 | 216 |
217 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 217 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
OLD | NEW |