OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 VIEWS_DEFAULT_THEME_PROVIDER_H_ | 5 #ifndef VIEWS_DEFAULT_THEME_PROVIDER_H_ |
6 #define VIEWS_DEFAULT_THEME_PROVIDER_H_ | 6 #define VIEWS_DEFAULT_THEME_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "ui/base/theme_provider.h" | 12 #include "ui/base/theme_provider.h" |
13 | 13 |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 class ResourceBundle; | 17 class ResourceBundle; |
18 } | 18 } |
19 using ui::ResourceBundle; | 19 using ui::ResourceBundle; |
20 | 20 |
21 namespace views { | 21 namespace views { |
22 | 22 |
23 class DefaultThemeProvider : public ui::ThemeProvider { | 23 class DefaultThemeProvider : public ui::ThemeProvider { |
24 public: | 24 public: |
25 DefaultThemeProvider() { }; | 25 DefaultThemeProvider(); |
26 virtual ~DefaultThemeProvider() { }; | 26 virtual ~DefaultThemeProvider(); |
27 | 27 |
28 // Overridden from ui::ThemeProvider. | 28 // Overridden from ui::ThemeProvider. |
29 virtual void Init(Profile* profile) { } | 29 virtual void Init(Profile* profile); |
30 virtual SkBitmap* GetBitmapNamed(int id) const; | 30 virtual SkBitmap* GetBitmapNamed(int id) const; |
31 virtual SkColor GetColor(int id) const { | 31 virtual SkColor GetColor(int id) const; |
32 // Return debugging-blue. | 32 virtual bool GetDisplayProperty(int id, int* result) const; |
33 return 0xff0000ff; | |
34 } | |
35 virtual bool GetDisplayProperty(int id, int* result) const { return false; } | |
36 virtual bool ShouldUseNativeFrame() const; | 33 virtual bool ShouldUseNativeFrame() const; |
37 virtual bool HasCustomImage(int id) const { return false; } | 34 virtual bool HasCustomImage(int id) const; |
38 virtual RefCountedMemory* GetRawData(int id) const { return NULL; } | 35 virtual RefCountedMemory* GetRawData(int id) const; |
39 | 36 |
40 private: | 37 private: |
41 DISALLOW_COPY_AND_ASSIGN(DefaultThemeProvider); | 38 DISALLOW_COPY_AND_ASSIGN(DefaultThemeProvider); |
42 }; | 39 }; |
43 | 40 |
44 } // namespace views | 41 } // namespace views |
45 | 42 |
46 #endif // VIEWS_DEFAULT_THEME_PROVIDER_H_ | 43 #endif // VIEWS_DEFAULT_THEME_PROVIDER_H_ |
OLD | NEW |