Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: ui/base/default_theme_provider_mac.mm

Issue 15240002: Cross-platform DefaultThemeProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't attach DefaultThemeProvider to all OSX windows. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/default_theme_provider.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
Robert Sesek 2013/05/20 16:33:25 nit: blank line after
groby-ooo-7-16 2013/05/25 00:45:37 Done.
8 #include "ui/base/resource/resource_bundle.h"
9
10 namespace ui {
11
12 #if !defined(TOOLKIT_VIEWS)
13 NSImage* DefaultThemeProvider::GetNSImageNamed(int id,
14 bool allow_default) const {
15 return ResourceBundle::GetSharedInstance().
16 GetNativeImageNamed(id).ToNSImage();
17 }
18
19 NSColor* DefaultThemeProvider::GetNSImageColorNamed(int id,
20 bool allow_default) const {
21 NSImage* image = GetNSImageNamed(id, allow_default);
22 return [NSColor colorWithPatternImage:image];
23 }
24
25 NSColor* DefaultThemeProvider::GetNSColor(int id,
26 bool allow_default) const {
27 return [NSColor redColor];
28 }
29
30 NSColor* DefaultThemeProvider::GetNSColorTint(int id,
31 bool allow_default) const {
32 return [NSColor redColor];
33 }
34
35 NSGradient* DefaultThemeProvider::GetNSGradient(int id) const {
36 return nil;
37 }
38 #endif
39
40 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/default_theme_provider.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698