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

Side by Side Diff: ui/base/default_theme_provider.cc

Issue 1492423003: Rejigger ThemeService: move exposure of ThemeProvider interface to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a test Created 5 years 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
OLDNEW
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 #include "ui/base/default_theme_provider.h" 5 #include "ui/base/default_theme_provider.h"
6 6
7 #include "ui/base/resource/resource_bundle.h" 7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/image/image_skia.h" 8 #include "ui/gfx/image/image_skia.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 DefaultThemeProvider::DefaultThemeProvider() {} 12 DefaultThemeProvider::DefaultThemeProvider() {}
13 13
14 DefaultThemeProvider::~DefaultThemeProvider() {} 14 DefaultThemeProvider::~DefaultThemeProvider() {}
15 15
16 bool DefaultThemeProvider::UsingSystemTheme() const {
17 return true;
18 }
19
20 gfx::ImageSkia* DefaultThemeProvider::GetImageSkiaNamed(int id) const { 16 gfx::ImageSkia* DefaultThemeProvider::GetImageSkiaNamed(int id) const {
21 return ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id); 17 return ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
22 } 18 }
23 19
24 SkColor DefaultThemeProvider::GetColor(int id) const { 20 SkColor DefaultThemeProvider::GetColor(int id) const {
25 // Return debugging-blue. 21 // Return debugging-blue.
26 return 0xff0000ff; 22 return 0xff0000ff;
27 } 23 }
28 24
29 int DefaultThemeProvider::GetDisplayProperty(int id) const { 25 int DefaultThemeProvider::GetDisplayProperty(int id) const {
30 return -1; 26 return -1;
31 } 27 }
32 28
33 bool DefaultThemeProvider::ShouldUseNativeFrame() const { 29 bool DefaultThemeProvider::ShouldUseNativeFrame() const {
34 return false; 30 return false;
35 } 31 }
36 32
37 bool DefaultThemeProvider::HasCustomImage(int id) const { 33 bool DefaultThemeProvider::HasCustomImage(int id) const {
38 return false; 34 return false;
39 } 35 }
40 36
41 base::RefCountedMemory* DefaultThemeProvider::GetRawData( 37 base::RefCountedMemory* DefaultThemeProvider::GetRawData(
42 int id, 38 int id,
43 ui::ScaleFactor scale_factor) const { 39 ui::ScaleFactor scale_factor) const {
44 return NULL; 40 return NULL;
45 } 41 }
46 42
47 } // namespace ui 43 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698