OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_GFX_NATIVE_THEME_LINUX_H_ | 5 #ifndef UI_GFX_NATIVE_THEME_LINUX_H_ |
6 #define UI_GFX_NATIVE_THEME_LINUX_H_ | 6 #define UI_GFX_NATIVE_THEME_LINUX_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "skia/ext/platform_canvas.h" | 9 #include "skia/ext/platform_canvas.h" |
10 #include "ui/gfx/native_theme.h" | 10 #include "ui/gfx/native_theme.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 class Size; | 14 class Size; |
15 | 15 |
16 // Linux theming API. | 16 // Linux theming API. |
17 class NativeThemeLinux : public NativeTheme { | 17 class NativeThemeLinux : public NativeTheme { |
18 public: | 18 public: |
| 19 NativeThemeLinux(); |
| 20 virtual ~NativeThemeLinux(); |
| 21 |
19 // Gets our singleton instance. | 22 // Gets our singleton instance. |
20 static const NativeThemeLinux* instance(); | 23 static const NativeThemeLinux* instance(); |
21 | 24 |
22 // NativeTheme implementation: | 25 // NativeTheme implementation: |
23 virtual gfx::Size GetPartSize(Part part, | 26 virtual gfx::Size GetPartSize(Part part, |
24 State state, | 27 State state, |
25 const ExtraParams& extra) const; | 28 const ExtraParams& extra) const; |
26 virtual void Paint(SkCanvas* canvas, | 29 virtual void Paint(SkCanvas* canvas, |
27 Part part, | 30 Part part, |
28 State state, | 31 State state, |
29 const gfx::Rect& rect, | 32 const gfx::Rect& rect, |
30 const ExtraParams& extra) const; | 33 const ExtraParams& extra) const; |
31 | 34 |
32 protected: | 35 protected: |
33 NativeThemeLinux(); | |
34 virtual ~NativeThemeLinux(); | |
35 | |
36 // Draw the arrow. Used by scrollbar and inner spin button. | 36 // Draw the arrow. Used by scrollbar and inner spin button. |
37 virtual void PaintArrowButton( | 37 virtual void PaintArrowButton( |
38 SkCanvas* gc, | 38 SkCanvas* gc, |
39 const gfx::Rect& rect, | 39 const gfx::Rect& rect, |
40 Part direction, | 40 Part direction, |
41 State state) const; | 41 State state) const; |
42 // Paint the scrollbar track. Done before the thumb so that it can contain | 42 // Paint the scrollbar track. Done before the thumb so that it can contain |
43 // alpha. | 43 // alpha. |
44 virtual void PaintScrollbarTrack(SkCanvas* canvas, | 44 virtual void PaintScrollbarTrack(SkCanvas* canvas, |
45 Part part, | 45 Part part, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 static unsigned int scrollbar_width_; | 137 static unsigned int scrollbar_width_; |
138 static unsigned int button_length_; | 138 static unsigned int button_length_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(NativeThemeLinux); | 140 DISALLOW_COPY_AND_ASSIGN(NativeThemeLinux); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace gfx | 143 } // namespace gfx |
144 | 144 |
145 #endif // UI_GFX_NATIVE_THEME_LINUX_H_ | 145 #endif // UI_GFX_NATIVE_THEME_LINUX_H_ |
OLD | NEW |