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" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // | 43 // |
44 // ThemeProvider is an abstract class that defines the API that should be | 44 // ThemeProvider is an abstract class that defines the API that should be |
45 // implemented to provide bitmaps and color information for a given theme. | 45 // implemented to provide bitmaps and color information for a given theme. |
46 // | 46 // |
47 //////////////////////////////////////////////////////////////////////////////// | 47 //////////////////////////////////////////////////////////////////////////////// |
48 | 48 |
49 class UI_BASE_EXPORT ThemeProvider { | 49 class UI_BASE_EXPORT ThemeProvider { |
50 public: | 50 public: |
51 virtual ~ThemeProvider(); | 51 virtual ~ThemeProvider(); |
52 | 52 |
53 // Whether we're using the native theme (which may or may not be the | 53 // Whether we're using the system theme (which may or may not be the |
54 // same as the default theme). | 54 // same as the default theme). |
55 virtual bool UsingNativeTheme() const = 0; | 55 virtual bool UsingSystemTheme() const = 0; |
56 | 56 |
57 // Get the image specified by |id|. An implementation of ThemeProvider should | 57 // Get the image specified by |id|. An implementation of ThemeProvider should |
58 // have its own source of ids (e.g. an enum, or external resource bundle). | 58 // have its own source of ids (e.g. an enum, or external resource bundle). |
59 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const = 0; | 59 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const = 0; |
60 | 60 |
61 // Get the color specified by |id|. | 61 // Get the color specified by |id|. |
62 virtual SkColor GetColor(int id) const = 0; | 62 virtual SkColor GetColor(int id) const = 0; |
63 | 63 |
64 // Get the property (e.g. an alignment expressed in an enum, or a width or | 64 // Get the property (e.g. an alignment expressed in an enum, or a width or |
65 // height) specified by |id|. | 65 // height) specified by |id|. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // is missing. | 107 // is missing. |
108 | 108 |
109 // As above, but flips it in RTL locales. | 109 // As above, but flips it in RTL locales. |
110 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; | 110 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; |
111 #endif | 111 #endif |
112 }; | 112 }; |
113 | 113 |
114 } // namespace ui | 114 } // namespace ui |
115 | 115 |
116 #endif // UI_BASE_THEME_PROVIDER_H_ | 116 #endif // UI_BASE_THEME_PROVIDER_H_ |
OLD | NEW |