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 "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 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 public: | 27 public: |
28 virtual ~ThemeProvider() { } | 28 virtual ~ThemeProvider() { } |
29 | 29 |
30 // Get the bitmap specified by |id|. An implementation of ThemeProvider should | 30 // Get the bitmap specified by |id|. An implementation of ThemeProvider should |
31 // have its own source of ids (e.g. an enum, or external resource bundle). | 31 // have its own source of ids (e.g. an enum, or external resource bundle). |
32 virtual SkBitmap* GetBitmapNamed(int id) = 0; | 32 virtual SkBitmap* GetBitmapNamed(int id) = 0; |
33 | 33 |
34 // Get the color specified by |id|. | 34 // Get the color specified by |id|. |
35 virtual SkColor GetColor(int id) = 0; | 35 virtual SkColor GetColor(int id) = 0; |
36 | 36 |
| 37 // Get the property (e.g. an alignment expressed in an enum, or a width or |
| 38 // height) specified by |id|. |
| 39 virtual bool GetDisplayProperty(int id, int* result) = 0; |
| 40 |
37 // Whether we should use the native system frame (typically Aero glass) or | 41 // Whether we should use the native system frame (typically Aero glass) or |
38 // a custom frame. | 42 // a custom frame. |
39 virtual bool ShouldUseNativeFrame() = 0; | 43 virtual bool ShouldUseNativeFrame() = 0; |
40 | 44 |
41 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) | 45 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) |
42 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared | 46 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared |
43 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme | 47 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme |
44 // provider and should not be freed. | 48 // provider and should not be freed. |
45 // | 49 // |
46 // The bitmap is assumed to exist. This function will log in release, and | 50 // The bitmap is assumed to exist. This function will log in release, and |
47 // assert in debug mode if it does not. On failure, this will return a | 51 // assert in debug mode if it does not. On failure, this will return a |
48 // pointer to a shared empty placeholder bitmap so it will be visible what | 52 // pointer to a shared empty placeholder bitmap so it will be visible what |
49 // is missing. | 53 // is missing. |
50 virtual GdkPixbuf* GetPixbufNamed(int id) = 0; | 54 virtual GdkPixbuf* GetPixbufNamed(int id) = 0; |
51 #endif | 55 #endif |
52 }; | 56 }; |
53 | 57 |
54 #endif // APP_THEME_PROVIDER_H_ | 58 #endif // APP_THEME_PROVIDER_H_ |
OLD | NEW |