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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "chrome/browser/prefs/pref_change_registrar.h" | 14 #include "chrome/browser/prefs/pref_change_registrar.h" |
15 #include "chrome/browser/themes/theme_service.h" | 15 #include "chrome/browser/themes/theme_service.h" |
16 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
17 #include "ui/base/glib/glib_integers.h" | 17 #include "ui/base/glib/glib_integers.h" |
18 #include "ui/base/gtk/gtk_signal.h" | 18 #include "ui/base/gtk/gtk_signal.h" |
19 #include "ui/base/gtk/owned_widget_gtk.h" | 19 #include "ui/base/gtk/owned_widget_gtk.h" |
20 #include "ui/gfx/color_utils.h" | 20 #include "ui/gfx/color_utils.h" |
21 | 21 |
22 class Profile; | 22 class Profile; |
23 | 23 |
| 24 namespace extensions { |
| 25 class Extension; |
| 26 } |
| 27 |
24 namespace gfx { | 28 namespace gfx { |
25 class CairoCachedSurface; | 29 class CairoCachedSurface; |
26 } | 30 } |
27 | 31 |
28 namespace ui { | 32 namespace ui { |
29 class GtkSignalRegistrar; | 33 class GtkSignalRegistrar; |
30 } | 34 } |
31 | 35 |
32 typedef struct _GdkDisplay GdkDisplay; | 36 typedef struct _GdkDisplay GdkDisplay; |
33 typedef struct _GdkEventExpose GdkEventExpose; | 37 typedef struct _GdkEventExpose GdkEventExpose; |
(...skipping 27 matching lines...) Expand all Loading... |
61 // Overridden from ThemeService: | 65 // Overridden from ThemeService: |
62 // | 66 // |
63 // Sets that we aren't using the system theme, then calls | 67 // Sets that we aren't using the system theme, then calls |
64 // ThemeService's implementation. | 68 // ThemeService's implementation. |
65 virtual void Init(Profile* profile) OVERRIDE; | 69 virtual void Init(Profile* profile) OVERRIDE; |
66 virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; | 70 virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; |
67 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE; | 71 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE; |
68 virtual const gfx::Image* GetImageNamed(int id) const OVERRIDE; | 72 virtual const gfx::Image* GetImageNamed(int id) const OVERRIDE; |
69 virtual SkColor GetColor(int id) const OVERRIDE; | 73 virtual SkColor GetColor(int id) const OVERRIDE; |
70 virtual bool HasCustomImage(int id) const OVERRIDE; | 74 virtual bool HasCustomImage(int id) const OVERRIDE; |
71 virtual void SetTheme(const Extension* extension) OVERRIDE; | 75 virtual void SetTheme(const extensions::Extension* extension) OVERRIDE; |
72 virtual void UseDefaultTheme() OVERRIDE; | 76 virtual void UseDefaultTheme() OVERRIDE; |
73 virtual void SetNativeTheme() OVERRIDE; | 77 virtual void SetNativeTheme() OVERRIDE; |
74 virtual bool UsingDefaultTheme() const OVERRIDE; | 78 virtual bool UsingDefaultTheme() const OVERRIDE; |
75 virtual bool UsingNativeTheme() const OVERRIDE; | 79 virtual bool UsingNativeTheme() const OVERRIDE; |
76 | 80 |
77 // Overridden from ThemeService, content::NotificationObserver: | 81 // Overridden from ThemeService, content::NotificationObserver: |
78 virtual void Observe(int type, | 82 virtual void Observe(int type, |
79 const content::NotificationSource& source, | 83 const content::NotificationSource& source, |
80 const content::NotificationDetails& details) OVERRIDE; | 84 const content::NotificationDetails& details) OVERRIDE; |
81 | 85 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 298 |
295 // The default folder icon and default bookmark icon for the GTK theme. | 299 // The default folder icon and default bookmark icon for the GTK theme. |
296 // These are static because the system can only have one theme at a time. | 300 // These are static because the system can only have one theme at a time. |
297 // They are cached when they are requested the first time, and cleared when | 301 // They are cached when they are requested the first time, and cleared when |
298 // the system theme changes. | 302 // the system theme changes. |
299 static gfx::Image* default_folder_icon_; | 303 static gfx::Image* default_folder_icon_; |
300 static gfx::Image* default_bookmark_icon_; | 304 static gfx::Image* default_bookmark_icon_; |
301 }; | 305 }; |
302 | 306 |
303 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ | 307 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ |
OLD | NEW |