OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 APP_THEME_PROVIDER_H_ | 5 #ifndef APP_THEME_PROVIDER_H_ |
6 #define APP_THEME_PROVIDER_H_ | 6 #define APP_THEME_PROVIDER_H_ |
7 | 7 |
8 #include "skia/include/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 | 9 |
10 class SkBitmap; | 10 class SkBitmap; |
11 | 11 |
12 //////////////////////////////////////////////////////////////////////////////// | 12 //////////////////////////////////////////////////////////////////////////////// |
13 // | 13 // |
14 // ThemeProvider | 14 // ThemeProvider |
15 // | 15 // |
16 // ThemeProvider is an abstract class that defines the API that should be | 16 // ThemeProvider is an abstract class that defines the API that should be |
17 // implemented to provide bitmaps and color information for a given theme. | 17 // implemented to provide bitmaps and color information for a given theme. |
18 // | 18 // |
19 //////////////////////////////////////////////////////////////////////////////// | 19 //////////////////////////////////////////////////////////////////////////////// |
20 | 20 |
21 class ThemeProvider { | 21 class ThemeProvider { |
22 public: | 22 public: |
23 virtual ~ThemeProvider() { } | 23 virtual ~ThemeProvider() { } |
24 | 24 |
25 // Get the bitmap specified by |id|. An implementation of ThemeProvider should | 25 // Get the bitmap specified by |id|. An implementation of ThemeProvider should |
26 // have its own source of ids (e.g. an enum, or external resource bundle). | 26 // have its own source of ids (e.g. an enum, or external resource bundle). |
27 virtual SkBitmap* GetBitmapNamed(int id) = 0; | 27 virtual SkBitmap* GetBitmapNamed(int id) = 0; |
28 | 28 |
29 // Get the color specified by |id|. | 29 // Get the color specified by |id|. |
30 virtual SkColor GetColor(int id) = 0; | 30 virtual SkColor GetColor(int id) = 0; |
31 }; | 31 }; |
32 | 32 |
33 #endif // APP_THEME_PROVIDER_H_ | 33 #endif // APP_THEME_PROVIDER_H_ |
OLD | NEW |