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_THEMES_THEME_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 6 #define CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 10 matching lines...) Expand all Loading... |
21 class BrowserThemePack; | 21 class BrowserThemePack; |
22 class ThemeServiceTest; | 22 class ThemeServiceTest; |
23 class Extension; | 23 class Extension; |
24 class FilePath; | 24 class FilePath; |
25 class Profile; | 25 class Profile; |
26 | 26 |
27 namespace color_utils { | 27 namespace color_utils { |
28 struct HSL; | 28 struct HSL; |
29 } | 29 } |
30 | 30 |
| 31 namespace gfx { |
| 32 class Image; |
| 33 } |
| 34 |
31 namespace ui { | 35 namespace ui { |
32 class ResourceBundle; | 36 class ResourceBundle; |
33 } | 37 } |
34 using ui::ResourceBundle; | 38 using ui::ResourceBundle; |
35 | 39 |
36 #ifdef __OBJC__ | 40 #ifdef __OBJC__ |
37 @class NSString; | 41 @class NSString; |
38 // Sent whenever the browser theme changes. Object => NSValue wrapping the | 42 // Sent whenever the browser theme changes. Object => NSValue wrapping the |
39 // ThemeService that changed. | 43 // ThemeService that changed. |
40 extern "C" NSString* const kBrowserThemeDidChangeNotification; | 44 extern "C" NSString* const kBrowserThemeDidChangeNotification; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } AlignmentMasks; | 137 } AlignmentMasks; |
134 | 138 |
135 // Background tiling choices. | 139 // Background tiling choices. |
136 typedef enum { | 140 typedef enum { |
137 NO_REPEAT = 0, | 141 NO_REPEAT = 0, |
138 REPEAT_X = 1, | 142 REPEAT_X = 1, |
139 REPEAT_Y = 2, | 143 REPEAT_Y = 2, |
140 REPEAT = 3 | 144 REPEAT = 3 |
141 } Tiling; | 145 } Tiling; |
142 | 146 |
| 147 // Returns a cross platform image for an id. |
| 148 // |
| 149 // TODO(erg): Make this a virtual, exposed through ui::ThemeProvider and the |
| 150 // main way to get theme properties out of the theme provider since it's |
| 151 // cross platform. |
| 152 const gfx::Image* GetImageNamed(int id) const; |
| 153 |
143 // ui::ThemeProvider implementation. | 154 // ui::ThemeProvider implementation. |
144 virtual void Init(Profile* profile) OVERRIDE; | 155 virtual void Init(Profile* profile) OVERRIDE; |
145 virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; | 156 virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; |
146 virtual SkColor GetColor(int id) const OVERRIDE; | 157 virtual SkColor GetColor(int id) const OVERRIDE; |
147 virtual bool GetDisplayProperty(int id, int* result) const OVERRIDE; | 158 virtual bool GetDisplayProperty(int id, int* result) const OVERRIDE; |
148 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 159 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
149 virtual bool HasCustomImage(int id) const OVERRIDE; | 160 virtual bool HasCustomImage(int id) const OVERRIDE; |
150 virtual RefCountedMemory* GetRawData(int id) const OVERRIDE; | 161 virtual RefCountedMemory* GetRawData(int id) const OVERRIDE; |
151 #if defined(OS_MACOSX) | 162 #if defined(OS_MACOSX) |
152 virtual NSImage* GetNSImageNamed(int id, bool allow_default) const OVERRIDE; | 163 virtual NSImage* GetNSImageNamed(int id, bool allow_default) const OVERRIDE; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 313 |
303 // The number of infobars currently displayed. | 314 // The number of infobars currently displayed. |
304 int number_of_infobars_; | 315 int number_of_infobars_; |
305 | 316 |
306 content::NotificationRegistrar registrar_; | 317 content::NotificationRegistrar registrar_; |
307 | 318 |
308 DISALLOW_COPY_AND_ASSIGN(ThemeService); | 319 DISALLOW_COPY_AND_ASSIGN(ThemeService); |
309 }; | 320 }; |
310 | 321 |
311 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 322 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
OLD | NEW |