| 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_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; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 //////////////////////////////////////////////////////////////////////////////// | 40 //////////////////////////////////////////////////////////////////////////////// |
| 41 // | 41 // |
| 42 // ThemeProvider | 42 // ThemeProvider |
| 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_EXPORT ThemeProvider { | 49 class UI_BASE_EXPORT ThemeProvider { |
| 50 public: | 50 public: |
| 51 virtual ~ThemeProvider(); | 51 virtual ~ThemeProvider(); |
| 52 | 52 |
| 53 // Get the image specified by |id|. An implementation of ThemeProvider should | 53 // Get the image specified by |id|. An implementation of ThemeProvider should |
| 54 // have its own source of ids (e.g. an enum, or external resource bundle). | 54 // have its own source of ids (e.g. an enum, or external resource bundle). |
| 55 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const = 0; | 55 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const = 0; |
| 56 | 56 |
| 57 // Get the color specified by |id|. | 57 // Get the color specified by |id|. |
| 58 virtual SkColor GetColor(int id) const = 0; | 58 virtual SkColor GetColor(int id) const = 0; |
| 59 | 59 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // is missing. | 103 // is missing. |
| 104 | 104 |
| 105 // As above, but flips it in RTL locales. | 105 // As above, but flips it in RTL locales. |
| 106 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; | 106 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; |
| 107 #endif | 107 #endif |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace ui | 110 } // namespace ui |
| 111 | 111 |
| 112 #endif // UI_BASE_THEME_PROVIDER_H_ | 112 #endif // UI_BASE_THEME_PROVIDER_H_ |
| OLD | NEW |