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 | |
35 namespace ui { | 31 namespace ui { |
36 class ResourceBundle; | 32 class ResourceBundle; |
37 } | 33 } |
38 using ui::ResourceBundle; | 34 using ui::ResourceBundle; |
39 | 35 |
40 #ifdef __OBJC__ | 36 #ifdef __OBJC__ |
41 @class NSString; | 37 @class NSString; |
42 // Sent whenever the browser theme changes. Object => NSValue wrapping the | 38 // Sent whenever the browser theme changes. Object => NSValue wrapping the |
43 // ThemeService that changed. | 39 // ThemeService that changed. |
44 extern "C" NSString* const kBrowserThemeDidChangeNotification; | 40 extern "C" NSString* const kBrowserThemeDidChangeNotification; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } AlignmentMasks; | 133 } AlignmentMasks; |
138 | 134 |
139 // Background tiling choices. | 135 // Background tiling choices. |
140 typedef enum { | 136 typedef enum { |
141 NO_REPEAT = 0, | 137 NO_REPEAT = 0, |
142 REPEAT_X = 1, | 138 REPEAT_X = 1, |
143 REPEAT_Y = 2, | 139 REPEAT_Y = 2, |
144 REPEAT = 3 | 140 REPEAT = 3 |
145 } Tiling; | 141 } Tiling; |
146 | 142 |
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 | |
154 // ui::ThemeProvider implementation. | 143 // ui::ThemeProvider implementation. |
155 virtual void Init(Profile* profile) OVERRIDE; | 144 virtual void Init(Profile* profile) OVERRIDE; |
156 virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; | 145 virtual SkBitmap* GetBitmapNamed(int id) const OVERRIDE; |
157 virtual SkColor GetColor(int id) const OVERRIDE; | 146 virtual SkColor GetColor(int id) const OVERRIDE; |
158 virtual bool GetDisplayProperty(int id, int* result) const OVERRIDE; | 147 virtual bool GetDisplayProperty(int id, int* result) const OVERRIDE; |
159 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 148 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
160 virtual bool HasCustomImage(int id) const OVERRIDE; | 149 virtual bool HasCustomImage(int id) const OVERRIDE; |
161 virtual RefCountedMemory* GetRawData(int id) const OVERRIDE; | 150 virtual RefCountedMemory* GetRawData(int id) const OVERRIDE; |
162 #if defined(OS_MACOSX) | 151 #if defined(OS_MACOSX) |
163 virtual NSImage* GetNSImageNamed(int id, bool allow_default) const OVERRIDE; | 152 virtual NSImage* GetNSImageNamed(int id, bool allow_default) const OVERRIDE; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 302 |
314 // The number of infobars currently displayed. | 303 // The number of infobars currently displayed. |
315 int number_of_infobars_; | 304 int number_of_infobars_; |
316 | 305 |
317 content::NotificationRegistrar registrar_; | 306 content::NotificationRegistrar registrar_; |
318 | 307 |
319 DISALLOW_COPY_AND_ASSIGN(ThemeService); | 308 DISALLOW_COPY_AND_ASSIGN(ThemeService); |
320 }; | 309 }; |
321 | 310 |
322 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ | 311 #endif // CHROME_BROWSER_THEMES_THEME_SERVICE_H_ |
OLD | NEW |