| 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" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Gets the NSColor for tinting with the specified |id|. | 94 // Gets the NSColor for tinting with the specified |id|. |
| 95 // | 95 // |
| 96 // The tint is not assumed to exist. If a theme does not provide a tint with | 96 // The tint is not assumed to exist. If a theme does not provide a tint with |
| 97 // that id, if |allow_default| is true, then the default tint will be | 97 // that id, if |allow_default| is true, then the default tint will be |
| 98 // returned, else this function will return nil. | 98 // returned, else this function will return nil. |
| 99 virtual NSColor* GetNSColorTint(int id, bool allow_default) const = 0; | 99 virtual NSColor* GetNSColorTint(int id, bool allow_default) const = 0; |
| 100 | 100 |
| 101 // Gets the NSGradient with the specified |id|. | 101 // Gets the NSGradient with the specified |id|. |
| 102 virtual NSGradient* GetNSGradient(int id) const = 0; | 102 virtual NSGradient* GetNSGradient(int id) const = 0; |
| 103 #elif defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) | 103 #elif defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) && !defined(OS_ANDROID) |
| 104 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared | 104 // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared |
| 105 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme | 105 // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme |
| 106 // provider and should not be freed. | 106 // provider and should not be freed. |
| 107 // | 107 // |
| 108 // The bitmap is assumed to exist. This function will log in release, and | 108 // The bitmap is assumed to exist. This function will log in release, and |
| 109 // assert in debug mode if it does not. On failure, this will return a | 109 // assert in debug mode if it does not. On failure, this will return a |
| 110 // pointer to a shared empty placeholder bitmap so it will be visible what | 110 // pointer to a shared empty placeholder bitmap so it will be visible what |
| 111 // is missing. | 111 // is missing. |
| 112 virtual GdkPixbuf* GetPixbufNamed(int id) const = 0; | 112 virtual GdkPixbuf* GetPixbufNamed(int id) const = 0; |
| 113 | 113 |
| 114 // As above, but flips it in RTL locales. | 114 // As above, but flips it in RTL locales. |
| 115 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; | 115 virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; |
| 116 #endif | 116 #endif |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace ui | 119 } // namespace ui |
| 120 | 120 |
| 121 #endif // UI_BASE_THEME_PROVIDER_H_ | 121 #endif // UI_BASE_THEME_PROVIDER_H_ |
| OLD | NEW |