OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/base/default_theme_provider.h" |
| 6 |
| 7 #import <Cocoa/Cocoa.h> |
| 8 |
| 9 #include "ui/base/resource/resource_bundle.h" |
| 10 |
| 11 namespace ui { |
| 12 |
| 13 #if !defined(TOOLKIT_VIEWS) |
| 14 NSImage* DefaultThemeProvider::GetNSImageNamed(int id, |
| 15 bool allow_default) const { |
| 16 return ResourceBundle::GetSharedInstance(). |
| 17 GetNativeImageNamed(id).ToNSImage(); |
| 18 } |
| 19 |
| 20 NSColor* DefaultThemeProvider::GetNSImageColorNamed(int id, |
| 21 bool allow_default) const { |
| 22 NSImage* image = GetNSImageNamed(id, allow_default); |
| 23 return [NSColor colorWithPatternImage:image]; |
| 24 } |
| 25 |
| 26 NSColor* DefaultThemeProvider::GetNSColor(int id, |
| 27 bool allow_default) const { |
| 28 return [NSColor redColor]; |
| 29 } |
| 30 |
| 31 NSColor* DefaultThemeProvider::GetNSColorTint(int id, |
| 32 bool allow_default) const { |
| 33 return [NSColor redColor]; |
| 34 } |
| 35 |
| 36 NSGradient* DefaultThemeProvider::GetNSGradient(int id) const { |
| 37 return nil; |
| 38 } |
| 39 #endif |
| 40 |
| 41 } // namespace ui |
OLD | NEW |