OLD | NEW |
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 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "skia/ext/platform_canvas.h" | 11 #include "skia/ext/platform_canvas.h" |
12 #include "ui/native_theme/native_theme.h" | 12 #include "ui/native_theme/native_theme.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Canvas; | 15 class Canvas; |
16 class ImageSkia; | 16 class ImageSkia; |
17 class Rect; | 17 class Rect; |
18 class Size; | 18 class Size; |
19 } | 19 } |
20 | 20 |
21 namespace ui { | 21 namespace ui { |
22 | 22 |
23 // Theme support for non-Windows toolkits. | 23 // Theme support for non-Windows toolkits. |
24 class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme { | 24 class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme { |
25 public: | 25 public: |
26 // NativeTheme implementation: | 26 // NativeTheme implementation: |
27 virtual gfx::Size GetPartSize(Part part, | 27 virtual gfx::Size GetPartSize(Part part, |
28 State state, | 28 State state, |
29 const ExtraParams& extra) const OVERRIDE; | 29 const ExtraParams& extra) const override; |
30 virtual void Paint(SkCanvas* canvas, | 30 virtual void Paint(SkCanvas* canvas, |
31 Part part, | 31 Part part, |
32 State state, | 32 State state, |
33 const gfx::Rect& rect, | 33 const gfx::Rect& rect, |
34 const ExtraParams& extra) const OVERRIDE; | 34 const ExtraParams& extra) const override; |
35 | 35 |
36 virtual void PaintStateTransition(SkCanvas* canvas, | 36 virtual void PaintStateTransition(SkCanvas* canvas, |
37 Part part, | 37 Part part, |
38 State startState, | 38 State startState, |
39 State endState, | 39 State endState, |
40 double progress, | 40 double progress, |
41 const gfx::Rect& rect) const OVERRIDE; | 41 const gfx::Rect& rect) const override; |
42 | 42 |
43 protected: | 43 protected: |
44 NativeThemeBase(); | 44 NativeThemeBase(); |
45 virtual ~NativeThemeBase(); | 45 virtual ~NativeThemeBase(); |
46 | 46 |
47 // Draw the arrow. Used by scrollbar and inner spin button. | 47 // Draw the arrow. Used by scrollbar and inner spin button. |
48 virtual void PaintArrowButton( | 48 virtual void PaintArrowButton( |
49 SkCanvas* gc, | 49 SkCanvas* gc, |
50 const gfx::Rect& rect, | 50 const gfx::Rect& rect, |
51 Part direction, | 51 Part direction, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 // The length of the arrow buttons, 0 means no buttons are drawn. | 204 // The length of the arrow buttons, 0 means no buttons are drawn. |
205 unsigned int scrollbar_button_length_; | 205 unsigned int scrollbar_button_length_; |
206 | 206 |
207 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); | 207 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); |
208 }; | 208 }; |
209 | 209 |
210 } // namespace ui | 210 } // namespace ui |
211 | 211 |
212 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 212 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
OLD | NEW |