| 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 <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 const SkColor& get_inactive_selection_fg_color() const { | 102 const SkColor& get_inactive_selection_fg_color() const { |
| 103 return inactive_selection_fg_color_; | 103 return inactive_selection_fg_color_; |
| 104 } | 104 } |
| 105 | 105 |
| 106 // These functions do not add a ref to the returned pixbuf, and it should not | 106 // These functions do not add a ref to the returned pixbuf, and it should not |
| 107 // be unreffed. If |native| is true, get the GTK_STOCK version of the icon. | 107 // be unreffed. If |native| is true, get the GTK_STOCK version of the icon. |
| 108 static GdkPixbuf* GetFolderIcon(bool native); | 108 static GdkPixbuf* GetFolderIcon(bool native); |
| 109 static GdkPixbuf* GetDefaultFavicon(bool native); | 109 static GdkPixbuf* GetDefaultFavicon(bool native); |
| 110 | 110 |
| 111 // Whether we use the GTK theme by default in the current desktop |
| 112 // environment. Returns true when we GTK defaults to on. |
| 113 static bool DefaultUsesSystemTheme(); |
| 114 |
| 111 private: | 115 private: |
| 112 typedef std::map<int, SkColor> ColorMap; | 116 typedef std::map<int, SkColor> ColorMap; |
| 113 typedef std::map<int, color_utils::HSL> TintMap; | 117 typedef std::map<int, color_utils::HSL> TintMap; |
| 114 typedef std::map<int, SkBitmap*> ImageCache; | 118 typedef std::map<int, SkBitmap*> ImageCache; |
| 115 | 119 |
| 116 // Clears all the GTK color overrides. | 120 // Clears all the GTK color overrides. |
| 117 virtual void ClearAllThemeData(); | 121 virtual void ClearAllThemeData(); |
| 118 | 122 |
| 119 // Load theme data from preferences, possibly picking colors from GTK. | 123 // Load theme data from preferences, possibly picking colors from GTK. |
| 120 virtual void LoadThemePrefs(); | 124 virtual void LoadThemePrefs(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 215 |
| 212 // The default folder icon and default bookmark icon for the GTK theme. | 216 // The default folder icon and default bookmark icon for the GTK theme. |
| 213 // These are static because the system can only have one theme at a time. | 217 // These are static because the system can only have one theme at a time. |
| 214 // They are cached when they are requested the first time, and cleared when | 218 // They are cached when they are requested the first time, and cleared when |
| 215 // the system theme changes. | 219 // the system theme changes. |
| 216 static GdkPixbuf* default_folder_icon_; | 220 static GdkPixbuf* default_folder_icon_; |
| 217 static GdkPixbuf* default_bookmark_icon_; | 221 static GdkPixbuf* default_bookmark_icon_; |
| 218 }; | 222 }; |
| 219 | 223 |
| 220 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 224 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
| OLD | NEW |