| 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 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| 11 #include "ui/ui_api.h" |
| 11 | 12 |
| 12 #if defined(OS_MACOSX) | 13 #if defined(OS_MACOSX) |
| 13 #ifdef __OBJC__ | 14 #ifdef __OBJC__ |
| 14 @class NSColor; | 15 @class NSColor; |
| 15 @class NSGradient; | 16 @class NSGradient; |
| 16 @class NSImage; | 17 @class NSImage; |
| 17 #else | 18 #else |
| 18 class NSColor; | 19 class NSColor; |
| 19 class NSGradient; | 20 class NSGradient; |
| 20 class NSImage; | 21 class NSImage; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 | 33 |
| 33 //////////////////////////////////////////////////////////////////////////////// | 34 //////////////////////////////////////////////////////////////////////////////// |
| 34 // | 35 // |
| 35 // ThemeProvider | 36 // ThemeProvider |
| 36 // | 37 // |
| 37 // ThemeProvider is an abstract class that defines the API that should be | 38 // ThemeProvider is an abstract class that defines the API that should be |
| 38 // implemented to provide bitmaps and color information for a given theme. | 39 // implemented to provide bitmaps and color information for a given theme. |
| 39 // | 40 // |
| 40 //////////////////////////////////////////////////////////////////////////////// | 41 //////////////////////////////////////////////////////////////////////////////// |
| 41 | 42 |
| 42 class ThemeProvider { | 43 class UI_API ThemeProvider { |
| 43 public: | 44 public: |
| 44 virtual ~ThemeProvider(); | 45 virtual ~ThemeProvider(); |
| 45 | 46 |
| 46 // TODO(beng): This dependency is horrible! | 47 // TODO(beng): This dependency is horrible! |
| 47 // Initialize the provider with the passed in profile. | 48 // Initialize the provider with the passed in profile. |
| 48 virtual void Init(Profile* profile) = 0; | 49 virtual void Init(Profile* profile) = 0; |
| 49 | 50 |
| 50 // Get the bitmap specified by |id|. An implementation of ThemeProvider should | 51 // Get the bitmap specified by |id|. An implementation of ThemeProvider should |
| 51 // have its own source of ids (e.g. an enum, or external resource bundle). | 52 // have its own source of ids (e.g. an enum, or external resource bundle). |
| 52 virtual SkBitmap* GetBitmapNamed(int id) const = 0; | 53 virtual SkBitmap* GetBitmapNamed(int id) const = 0; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 virtual GdkPixbuf* GetPixbufNamed(int id) const = 0; | 112 virtual GdkPixbuf* GetPixbufNamed(int id) const = 0; |
| 112 | 113 |
| 113 // As above, but flips it in RTL locales. | 114 // As above, but flips it in RTL locales. |
| 114 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; | 115 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; |
| 115 #endif | 116 #endif |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace ui | 119 } // namespace ui |
| 119 | 120 |
| 120 #endif // UI_BASE_THEME_PROVIDER_H_ | 121 #endif // UI_BASE_THEME_PROVIDER_H_ |
| OLD | NEW |