OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_THEME_PROVIDER_H_ |
6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "app/gtk_integers.h" | |
13 #include "app/gtk_signal.h" | |
14 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
15 #include "chrome/browser/prefs/pref_change_registrar.h" | 13 #include "chrome/browser/prefs/pref_change_registrar.h" |
16 #include "chrome/browser/themes/browser_theme_provider.h" | 14 #include "chrome/browser/themes/browser_theme_provider.h" |
17 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | 15 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" |
18 #include "chrome/common/notification_observer.h" | 16 #include "chrome/common/notification_observer.h" |
19 #include "gfx/color_utils.h" | 17 #include "gfx/color_utils.h" |
| 18 #include "ui/base/gtk/gtk_integers.h" |
| 19 #include "ui/base/gtk/gtk_signal.h" |
20 | 20 |
21 class CairoCachedSurface; | 21 class CairoCachedSurface; |
| 22 class Profile; |
| 23 |
| 24 namespace ui { |
22 class GtkSignalRegistrar; | 25 class GtkSignalRegistrar; |
23 class Profile; | 26 } |
24 | 27 |
25 typedef struct _GdkDisplay GdkDisplay; | 28 typedef struct _GdkDisplay GdkDisplay; |
26 typedef struct _GdkEventExpose GdkEventExpose; | 29 typedef struct _GdkEventExpose GdkEventExpose; |
27 typedef struct _GdkPixbuf GdkPixbuf; | 30 typedef struct _GdkPixbuf GdkPixbuf; |
28 typedef struct _GtkIconSet GtkIconSet; | 31 typedef struct _GtkIconSet GtkIconSet; |
29 typedef struct _GtkStyle GtkStyle; | 32 typedef struct _GtkStyle GtkStyle; |
30 typedef struct _GtkWidget GtkWidget; | 33 typedef struct _GtkWidget GtkWidget; |
31 | 34 |
32 // Specialization of BrowserThemeProvider which supplies system colors. | 35 // Specialization of BrowserThemeProvider which supplies system colors. |
33 class GtkThemeProvider : public BrowserThemeProvider, | 36 class GtkThemeProvider : public BrowserThemeProvider, |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 GtkWidget* fake_frame_; | 252 GtkWidget* fake_frame_; |
250 OwnedWidgetGtk fake_label_; | 253 OwnedWidgetGtk fake_label_; |
251 OwnedWidgetGtk fake_entry_; | 254 OwnedWidgetGtk fake_entry_; |
252 OwnedWidgetGtk fake_menu_item_; | 255 OwnedWidgetGtk fake_menu_item_; |
253 | 256 |
254 // A list of all GtkChromeButton instances. We hold on to these to notify | 257 // A list of all GtkChromeButton instances. We hold on to these to notify |
255 // them of theme changes. | 258 // them of theme changes. |
256 std::vector<GtkWidget*> chrome_buttons_; | 259 std::vector<GtkWidget*> chrome_buttons_; |
257 | 260 |
258 // Tracks all the signals we have connected to on various widgets. | 261 // Tracks all the signals we have connected to on various widgets. |
259 scoped_ptr<GtkSignalRegistrar> signals_; | 262 scoped_ptr<ui::GtkSignalRegistrar> signals_; |
260 | 263 |
261 // Tints and colors calculated by LoadGtkValues() that are given to the | 264 // Tints and colors calculated by LoadGtkValues() that are given to the |
262 // caller while |use_gtk_| is true. | 265 // caller while |use_gtk_| is true. |
263 ColorMap colors_; | 266 ColorMap colors_; |
264 TintMap tints_; | 267 TintMap tints_; |
265 | 268 |
266 // Colors used to tint certain icons. | 269 // Colors used to tint certain icons. |
267 color_utils::HSL button_tint_; | 270 color_utils::HSL button_tint_; |
268 color_utils::HSL entry_tint_; | 271 color_utils::HSL entry_tint_; |
269 color_utils::HSL selected_entry_tint_; | 272 color_utils::HSL selected_entry_tint_; |
(...skipping 30 matching lines...) Expand all Loading... |
300 | 303 |
301 // The default folder icon and default bookmark icon for the GTK theme. | 304 // The default folder icon and default bookmark icon for the GTK theme. |
302 // These are static because the system can only have one theme at a time. | 305 // These are static because the system can only have one theme at a time. |
303 // They are cached when they are requested the first time, and cleared when | 306 // They are cached when they are requested the first time, and cleared when |
304 // the system theme changes. | 307 // the system theme changes. |
305 static GdkPixbuf* default_folder_icon_; | 308 static GdkPixbuf* default_folder_icon_; |
306 static GdkPixbuf* default_bookmark_icon_; | 309 static GdkPixbuf* default_bookmark_icon_; |
307 }; | 310 }; |
308 | 311 |
309 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_PROVIDER_H_ | 312 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_PROVIDER_H_ |
OLD | NEW |