| 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" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // doesn't provide a certain image, but custom themes might (badges, etc). | 70 // doesn't provide a certain image, but custom themes might (badges, etc). |
| 71 virtual bool HasCustomImage(int id) const = 0; | 71 virtual bool HasCustomImage(int id) const = 0; |
| 72 | 72 |
| 73 // Reads the image data from the theme file into the specified vector. Only | 73 // Reads the image data from the theme file into the specified vector. Only |
| 74 // valid for un-themed resources and the themed IDR_THEME_NTP_* in most | 74 // valid for un-themed resources and the themed IDR_THEME_NTP_* in most |
| 75 // implementations of ThemeProvider. Returns NULL on error. | 75 // implementations of ThemeProvider. Returns NULL on error. |
| 76 virtual base::RefCountedMemory* GetRawData( | 76 virtual base::RefCountedMemory* GetRawData( |
| 77 int id, | 77 int id, |
| 78 ui::ScaleFactor scale_factor) const = 0; | 78 ui::ScaleFactor scale_factor) const = 0; |
| 79 | 79 |
| 80 #if defined(OS_MACOSX) && !defined(TOOLKIT_VIEWS) | 80 #if defined(OS_MACOSX) |
| 81 // Gets the NSImage with the specified |id|. | 81 // Gets the NSImage with the specified |id|. |
| 82 virtual NSImage* GetNSImageNamed(int id) const = 0; | 82 virtual NSImage* GetNSImageNamed(int id) const = 0; |
| 83 | 83 |
| 84 // Gets the NSImage that GetNSImageNamed (above) would return, but returns it | 84 // Gets the NSImage that GetNSImageNamed (above) would return, but returns it |
| 85 // as a pattern color. | 85 // as a pattern color. |
| 86 virtual NSColor* GetNSImageColorNamed(int id) const = 0; | 86 virtual NSColor* GetNSImageColorNamed(int id) const = 0; |
| 87 | 87 |
| 88 // Gets the NSColor with the specified |id|. | 88 // Gets the NSColor with the specified |id|. |
| 89 virtual NSColor* GetNSColor(int id) const = 0; | 89 virtual NSColor* GetNSColor(int id) const = 0; |
| 90 | 90 |
| 91 // Gets the NSColor for tinting with the specified |id|. | 91 // Gets the NSColor for tinting with the specified |id|. |
| 92 virtual NSColor* GetNSColorTint(int id) const = 0; | 92 virtual NSColor* GetNSColorTint(int id) const = 0; |
| 93 | 93 |
| 94 // Gets the NSGradient with the specified |id|. | 94 // Gets the NSGradient with the specified |id|. |
| 95 virtual NSGradient* GetNSGradient(int id) const = 0; | 95 virtual NSGradient* GetNSGradient(int id) const = 0; |
| 96 #endif | 96 #endif |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace ui | 99 } // namespace ui |
| 100 | 100 |
| 101 #endif // UI_BASE_THEME_PROVIDER_H_ | 101 #endif // UI_BASE_THEME_PROVIDER_H_ |
| OLD | NEW |