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

Side by Side Diff: ui/views/widget/default_theme_provider.cc

Issue 15240002: Cross-platform DefaultThemeProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comment. 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/views/widget/default_theme_provider.h ('k') | ui/views/widget/widget.h » ('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) 2012 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/views/widget/default_theme_provider.h"
6
7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/image/image_skia.h"
9
10 #if defined(OS_WIN) && !defined(USE_AURA)
11 #include "ui/base/win/shell.h"
12 #endif
13
14 namespace views {
15
16 DefaultThemeProvider::DefaultThemeProvider() {}
17
18 DefaultThemeProvider::~DefaultThemeProvider() {}
19
20 gfx::ImageSkia* DefaultThemeProvider::GetImageSkiaNamed(int id) const {
21 return ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
22 }
23
24 SkColor DefaultThemeProvider::GetColor(int id) const {
25 // Return debugging-blue.
26 return 0xff0000ff;
27 }
28
29 bool DefaultThemeProvider::GetDisplayProperty(int id, int* result) const {
30 return false;
31 }
32
33 bool DefaultThemeProvider::ShouldUseNativeFrame() const {
34 #if defined(OS_WIN) && !defined(USE_AURA)
35 return ui::win::IsAeroGlassEnabled();
36 #else
37 return false;
38 #endif
39 }
40
41 bool DefaultThemeProvider::HasCustomImage(int id) const {
42 return false;
43 }
44
45 base::RefCountedMemory* DefaultThemeProvider::GetRawData(
46 int id,
47 ui::ScaleFactor scale_factor) const {
48 return NULL;
49 }
50
51 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/default_theme_provider.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698