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 UI_BASE_THEME_PROVIDER_H_ | 5 #ifndef UI_BASE_THEME_PROVIDER_H_ |
6 #define UI_BASE_THEME_PROVIDER_H_ | 6 #define UI_BASE_THEME_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/base/layout.h" | 10 #include "ui/base/layout.h" |
11 #include "ui/base/ui_base_export.h" | 11 #include "ui/base/ui_base_export.h" |
12 | 12 |
13 #if defined(OS_MACOSX) | 13 #if defined(OS_MACOSX) |
14 #ifdef __OBJC__ | 14 #ifdef __OBJC__ |
15 @class NSColor; | 15 @class NSColor; |
16 @class NSGradient; | 16 @class NSGradient; |
17 @class NSImage; | 17 @class NSImage; |
18 #else | 18 #else |
19 class NSColor; | 19 class NSColor; |
20 class NSGradient; | 20 class NSGradient; |
21 class NSImage; | 21 class NSImage; |
22 #endif // __OBJC__ | 22 #endif // __OBJC__ |
23 #elif !defined(OS_WIN) | |
24 typedef struct _GdkColor GdkColor; | |
25 typedef struct _GdkPixbuf GdkPixbuf; | |
26 #endif // OS_* | 23 #endif // OS_* |
27 | 24 |
28 class SkBitmap; | 25 class SkBitmap; |
29 | 26 |
30 namespace base { | 27 namespace base { |
31 class RefCountedMemory; | 28 class RefCountedMemory; |
32 } | 29 } |
33 | 30 |
34 namespace gfx { | 31 namespace gfx { |
35 class ImageSkia; | 32 class ImageSkia; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 virtual NSColor* GetNSImageColorNamed(int id) const = 0; | 86 virtual NSColor* GetNSImageColorNamed(int id) const = 0; |
90 | 87 |
91 // Gets the NSColor with the specified |id|. | 88 // Gets the NSColor with the specified |id|. |
92 virtual NSColor* GetNSColor(int id) const = 0; | 89 virtual NSColor* GetNSColor(int id) const = 0; |
93 | 90 |
94 // Gets the NSColor for tinting with the specified |id|. | 91 // Gets the NSColor for tinting with the specified |id|. |
95 virtual NSColor* GetNSColorTint(int id) const = 0; | 92 virtual NSColor* GetNSColorTint(int id) const = 0; |
96 | 93 |
97 // Gets the NSGradient with the specified |id|. | 94 // Gets the NSGradient with the specified |id|. |
98 virtual NSGradient* GetNSGradient(int id) const = 0; | 95 virtual NSGradient* GetNSGradient(int id) const = 0; |
99 #elif defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) && !defined(OS_ANDROID) | |
100 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared | |
101 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme | |
102 // provider and should not be freed. | |
103 // | |
104 // The bitmap is assumed to exist. This function will log in release, and | |
105 // assert in debug mode if it does not. On failure, this will return a | |
106 // pointer to a shared empty placeholder bitmap so it will be visible what | |
107 // is missing. | |
108 | |
109 // As above, but flips it in RTL locales. | |
110 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; | |
111 #endif | 96 #endif |
112 }; | 97 }; |
113 | 98 |
114 } // namespace ui | 99 } // namespace ui |
115 | 100 |
116 #endif // UI_BASE_THEME_PROVIDER_H_ | 101 #endif // UI_BASE_THEME_PROVIDER_H_ |
OLD | NEW |