| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/prefs/pref_change_registrar.h" | 13 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 14 #include "chrome/browser/themes/theme_service.h" | 14 #include "chrome/browser/themes/theme_service.h" |
| 15 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | |
| 16 #include "content/common/notification_observer.h" | 15 #include "content/common/notification_observer.h" |
| 17 #include "ui/base/gtk/gtk_integers.h" | 16 #include "ui/base/gtk/gtk_integers.h" |
| 18 #include "ui/base/gtk/gtk_signal.h" | 17 #include "ui/base/gtk/gtk_signal.h" |
| 18 #include "ui/base/gtk/owned_widget_gtk.h" |
| 19 #include "ui/gfx/color_utils.h" | 19 #include "ui/gfx/color_utils.h" |
| 20 | 20 |
| 21 class CairoCachedSurface; | 21 class CairoCachedSurface; |
| 22 class Profile; | 22 class Profile; |
| 23 | 23 |
| 24 namespace ui { | 24 namespace ui { |
| 25 class GtkSignalRegistrar; | 25 class GtkSignalRegistrar; |
| 26 } | 26 } |
| 27 | 27 |
| 28 typedef struct _GdkDisplay GdkDisplay; | 28 typedef struct _GdkDisplay GdkDisplay; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 CHROMEGTK_CALLBACK_1(GtkThemeService, gboolean, OnSeparatorExpose, | 252 CHROMEGTK_CALLBACK_1(GtkThemeService, gboolean, OnSeparatorExpose, |
| 253 GdkEventExpose*); | 253 GdkEventExpose*); |
| 254 | 254 |
| 255 // Whether we should be using gtk rendering. | 255 // Whether we should be using gtk rendering. |
| 256 bool use_gtk_; | 256 bool use_gtk_; |
| 257 | 257 |
| 258 // GtkWidgets that exist only so we can look at their properties (and take | 258 // GtkWidgets that exist only so we can look at their properties (and take |
| 259 // their colors). | 259 // their colors). |
| 260 GtkWidget* fake_window_; | 260 GtkWidget* fake_window_; |
| 261 GtkWidget* fake_frame_; | 261 GtkWidget* fake_frame_; |
| 262 OwnedWidgetGtk fake_label_; | 262 ui::OwnedWidgetGtk fake_label_; |
| 263 OwnedWidgetGtk fake_entry_; | 263 ui::OwnedWidgetGtk fake_entry_; |
| 264 OwnedWidgetGtk fake_menu_item_; | 264 ui::OwnedWidgetGtk fake_menu_item_; |
| 265 | 265 |
| 266 // A list of diferent types of widgets that we hold on to these to notify | 266 // A list of diferent types of widgets that we hold on to these to notify |
| 267 // them of theme changes. We do not own these and listen for their | 267 // them of theme changes. We do not own these and listen for their |
| 268 // destruction via OnDestory{ChromeButton,ChromeLinkButton,Label}. | 268 // destruction via OnDestory{ChromeButton,ChromeLinkButton,Label}. |
| 269 std::vector<GtkWidget*> chrome_buttons_; | 269 std::vector<GtkWidget*> chrome_buttons_; |
| 270 std::vector<GtkWidget*> link_buttons_; | 270 std::vector<GtkWidget*> link_buttons_; |
| 271 std::map<GtkWidget*, GdkColor> labels_; | 271 std::map<GtkWidget*, GdkColor> labels_; |
| 272 | 272 |
| 273 // Tracks all the signals we have connected to on various widgets. | 273 // Tracks all the signals we have connected to on various widgets. |
| 274 scoped_ptr<ui::GtkSignalRegistrar> signals_; | 274 scoped_ptr<ui::GtkSignalRegistrar> signals_; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 // The default folder icon and default bookmark icon for the GTK theme. | 316 // The default folder icon and default bookmark icon for the GTK theme. |
| 317 // These are static because the system can only have one theme at a time. | 317 // These are static because the system can only have one theme at a time. |
| 318 // They are cached when they are requested the first time, and cleared when | 318 // They are cached when they are requested the first time, and cleared when |
| 319 // the system theme changes. | 319 // the system theme changes. |
| 320 static GdkPixbuf* default_folder_icon_; | 320 static GdkPixbuf* default_folder_icon_; |
| 321 static GdkPixbuf* default_bookmark_icon_; | 321 static GdkPixbuf* default_bookmark_icon_; |
| 322 }; | 322 }; |
| 323 | 323 |
| 324 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 324 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
| OLD | NEW |