| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 SkColor get_active_selection_fg_color() const { | 133 SkColor get_active_selection_fg_color() const { |
| 134 return active_selection_fg_color_; | 134 return active_selection_fg_color_; |
| 135 } | 135 } |
| 136 SkColor get_inactive_selection_bg_color() const { | 136 SkColor get_inactive_selection_bg_color() const { |
| 137 return inactive_selection_bg_color_; | 137 return inactive_selection_bg_color_; |
| 138 } | 138 } |
| 139 SkColor get_inactive_selection_fg_color() const { | 139 SkColor get_inactive_selection_fg_color() const { |
| 140 return inactive_selection_fg_color_; | 140 return inactive_selection_fg_color_; |
| 141 } | 141 } |
| 142 SkColor get_location_bar_text_color() const { |
| 143 return location_bar_text_color_; |
| 144 } |
| 145 SkColor get_location_bar_bg_color() const { |
| 146 return location_bar_bg_color_; |
| 147 } |
| 142 | 148 |
| 143 // These functions return an image that is not owned by the caller and should | 149 // These functions return an image that is not owned by the caller and should |
| 144 // not be deleted. If |native| is true, get the GTK_STOCK version of the | 150 // not be deleted. If |native| is true, get the GTK_STOCK version of the |
| 145 // icon. | 151 // icon. |
| 146 static gfx::Image GetFolderIcon(bool native); | 152 static gfx::Image GetFolderIcon(bool native); |
| 147 static gfx::Image GetDefaultFavicon(bool native); | 153 static gfx::Image GetDefaultFavicon(bool native); |
| 148 | 154 |
| 149 // Whether we use the GTK theme by default in the current desktop | 155 // Whether we use the GTK theme by default in the current desktop |
| 150 // environment. Returns true when we GTK defaults to on. | 156 // environment. Returns true when we GTK defaults to on. |
| 151 static bool DefaultUsesSystemTheme(); | 157 static bool DefaultUsesSystemTheme(); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // Colors that we pass to WebKit. These are generated each time the theme | 279 // Colors that we pass to WebKit. These are generated each time the theme |
| 274 // changes. | 280 // changes. |
| 275 SkColor focus_ring_color_; | 281 SkColor focus_ring_color_; |
| 276 SkColor thumb_active_color_; | 282 SkColor thumb_active_color_; |
| 277 SkColor thumb_inactive_color_; | 283 SkColor thumb_inactive_color_; |
| 278 SkColor track_color_; | 284 SkColor track_color_; |
| 279 SkColor active_selection_bg_color_; | 285 SkColor active_selection_bg_color_; |
| 280 SkColor active_selection_fg_color_; | 286 SkColor active_selection_fg_color_; |
| 281 SkColor inactive_selection_bg_color_; | 287 SkColor inactive_selection_bg_color_; |
| 282 SkColor inactive_selection_fg_color_; | 288 SkColor inactive_selection_fg_color_; |
| 289 SkColor location_bar_bg_color_; |
| 290 SkColor location_bar_text_color_; |
| 283 | 291 |
| 284 // A GtkIconSet that has the tinted icons for the NORMAL and PRELIGHT states | 292 // A GtkIconSet that has the tinted icons for the NORMAL and PRELIGHT states |
| 285 // of the IDR_FULLSCREEN_MENU_BUTTON tinted to the respective menu item label | 293 // of the IDR_FULLSCREEN_MENU_BUTTON tinted to the respective menu item label |
| 286 // colors. | 294 // colors. |
| 287 GtkIconSet* fullscreen_icon_set_; | 295 GtkIconSet* fullscreen_icon_set_; |
| 288 | 296 |
| 289 // Image cache of lazily created images, created when requested by | 297 // Image cache of lazily created images, created when requested by |
| 290 // GetBitmapNamed(). | 298 // GetBitmapNamed(). |
| 291 mutable ImageCache gtk_images_; | 299 mutable ImageCache gtk_images_; |
| 292 | 300 |
| 293 PrefChangeRegistrar registrar_; | 301 PrefChangeRegistrar registrar_; |
| 294 | 302 |
| 295 // This is a dummy widget that only exists so we have something to pass to | 303 // This is a dummy widget that only exists so we have something to pass to |
| 296 // gtk_widget_render_icon(). | 304 // gtk_widget_render_icon(). |
| 297 static GtkWidget* icon_widget_; | 305 static GtkWidget* icon_widget_; |
| 298 | 306 |
| 299 // The default folder icon and default bookmark icon for the GTK theme. | 307 // The default folder icon and default bookmark icon for the GTK theme. |
| 300 // These are static because the system can only have one theme at a time. | 308 // These are static because the system can only have one theme at a time. |
| 301 // They are cached when they are requested the first time, and cleared when | 309 // They are cached when they are requested the first time, and cleared when |
| 302 // the system theme changes. | 310 // the system theme changes. |
| 303 static base::LazyInstance<gfx::Image> default_folder_icon_; | 311 static base::LazyInstance<gfx::Image> default_folder_icon_; |
| 304 static base::LazyInstance<gfx::Image> default_bookmark_icon_; | 312 static base::LazyInstance<gfx::Image> default_bookmark_icon_; |
| 305 }; | 313 }; |
| 306 | 314 |
| 307 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 315 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
| OLD | NEW |