OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "chrome/browser/browser_theme_provider.h" | 10 #include "chrome/browser/browser_theme_provider.h" |
11 #include "chrome/common/notification_observer.h" | 11 #include "chrome/common/notification_observer.h" |
| 12 #include "chrome/common/owned_widget_gtk.h" |
12 | 13 |
13 #include "skia/ext/skia_utils.h" | 14 #include "skia/ext/skia_utils.h" |
14 | 15 |
15 class Profile; | 16 class Profile; |
16 | 17 |
17 typedef struct _GtkStyle GtkStyle; | 18 typedef struct _GtkStyle GtkStyle; |
18 typedef struct _GtkWidget GtkWidget; | 19 typedef struct _GtkWidget GtkWidget; |
19 | 20 |
20 // Specialization of BrowserThemeProvider which supplies system colors. | 21 // Specialization of BrowserThemeProvider which supplies system colors. |
21 class GtkThemeProvider : public BrowserThemeProvider, | 22 class GtkThemeProvider : public BrowserThemeProvider, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // remove it from our internal list. | 87 // remove it from our internal list. |
87 static void OnDestroyChromeButton(GtkWidget* button, | 88 static void OnDestroyChromeButton(GtkWidget* button, |
88 GtkThemeProvider* provider); | 89 GtkThemeProvider* provider); |
89 | 90 |
90 // Whether we should be using gtk rendering. | 91 // Whether we should be using gtk rendering. |
91 bool use_gtk_; | 92 bool use_gtk_; |
92 | 93 |
93 // GtkWidgets that exist only so we can look at their properties (and take | 94 // GtkWidgets that exist only so we can look at their properties (and take |
94 // their colors). | 95 // their colors). |
95 GtkWidget* fake_window_; | 96 GtkWidget* fake_window_; |
96 GtkWidget* fake_label_; | 97 OwnedWidgetGtk fake_label_; |
97 | 98 |
98 // A list of all GtkChromeButton instances. We hold on to these to notify | 99 // A list of all GtkChromeButton instances. We hold on to these to notify |
99 // them of theme changes. | 100 // them of theme changes. |
100 std::vector<GtkWidget*> chrome_buttons_; | 101 std::vector<GtkWidget*> chrome_buttons_; |
101 }; | 102 }; |
102 | 103 |
103 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ | 104 #endif // CHROME_BROWSER_GTK_GTK_THEME_PROVIDER_H_ |
OLD | NEW |