OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ | 5 #ifndef CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ |
6 #define CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ | 6 #define CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ |
7 | 7 |
8 #include "third_party/WebKit/public/platform/WebThemeEngine.h" | 8 #include "third_party/WebKit/public/platform/WebThemeEngine.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 class WebThemeEngineImpl : public blink::WebThemeEngine { | 12 class WebThemeEngineImpl : public blink::WebThemeEngine { |
13 public: | 13 public: |
14 // WebThemeEngine methods: | 14 // WebThemeEngine methods: |
15 virtual blink::WebSize getSize(blink::WebThemeEngine::Part); | 15 virtual blink::WebSize getSize(blink::WebThemeEngine::Part); |
16 virtual void paint( | 16 virtual void paint( |
17 blink::WebCanvas* canvas, | 17 blink::WebCanvas* canvas, |
18 blink::WebThemeEngine::Part part, | 18 blink::WebThemeEngine::Part part, |
19 blink::WebThemeEngine::State state, | 19 blink::WebThemeEngine::State state, |
20 const blink::WebRect& rect, | 20 const blink::WebRect& rect, |
21 const blink::WebThemeEngine::ExtraParams* extra_params); | 21 const blink::WebThemeEngine::ExtraParams* extra_params); |
22 virtual void paintStateTransition(blink::WebCanvas* canvas, | 22 virtual void paintStateTransition(blink::WebCanvas* canvas, |
23 blink::WebThemeEngine::Part part, | 23 blink::WebThemeEngine::Part part, |
24 blink::WebThemeEngine::State startState, | 24 blink::WebThemeEngine::State startState, |
25 blink::WebThemeEngine::State endState, | 25 blink::WebThemeEngine::State endState, |
26 double progress, | 26 double progress, |
27 const blink::WebRect& rect); | 27 const blink::WebRect& rect); |
28 | |
29 // The next 4 functions are only invoked on Windows. | |
jam
2015/04/03 15:08:19
why not behind OS_WIN?
ananta
2015/04/03 19:17:04
Done.
| |
30 | |
31 // Caches the vertical scrollbar width. | |
32 static void SetVerticalScrollbarWidth(int32 vertical_scroll_bar_width); | |
33 | |
34 // Caches the horizontal scrollbar height. | |
35 static void SetHorizontalScrollbarHeight(int32 horizontal_scroll_bar_height); | |
36 | |
37 // Caches the vertical scrollbar arrow bitmap. | |
38 static void SetVerticalArrowBitmapHeight(int32 vertical_arrow_bitmap_height); | |
39 | |
40 // Caches the horizontal scrollbar arrow bitmap. | |
41 static void SetHorizontalArrowBitmapWidth(int32 horizontal_arrow_bitmap_width) ; | |
jam
2015/04/03 15:08:19
nit 80 chars
ananta
2015/04/03 19:17:04
The four functions here have been collapsed to one
| |
42 | |
43 private: | |
44 // The width of a vertical scroll bar in dips. | |
45 static int32 vertical_scroll_bar_width_; | |
jam
2015/04/03 15:08:19
nit: i think the convention is to put these as glo
ananta
2015/04/03 19:17:04
Done.
| |
46 | |
47 // The height of a horizontal scroll bar in dips. | |
48 static int32 horizontal_scroll_bar_height_; | |
49 | |
50 // The height of the arrow bitmap on a vertical scroll bar in dips. | |
51 static int32 vertical_arrow_bitmap_height_; | |
52 | |
53 // The width of the arrow bitmap on a horizontal scroll bar in dips. | |
54 static int32 horizontal_arrow_bitmap_width_; | |
28 }; | 55 }; |
29 | 56 |
30 } // namespace content | 57 } // namespace content |
31 | 58 |
32 #endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ | 59 #endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ |
OLD | NEW |