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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "third_party/WebKit/public/platform/WebThemeEngine.h" | 11 #include "third_party/WebKit/public/platform/WebThemeEngine.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class WebThemeEngineImpl : public blink::WebThemeEngine { | 15 class WebThemeEngineImpl : public blink::WebThemeEngine { |
16 public: | 16 public: |
17 // WebThemeEngine methods: | 17 // WebThemeEngine methods: |
18 blink::WebSize getSize(blink::WebThemeEngine::Part) override; | 18 blink::WebSize getSize(blink::WebThemeEngine::Part) override; |
19 void paint(blink::WebCanvas* canvas, | 19 void paint(blink::WebCanvas* canvas, |
20 blink::WebThemeEngine::Part part, | 20 blink::WebThemeEngine::Part part, |
21 blink::WebThemeEngine::State state, | 21 blink::WebThemeEngine::State state, |
22 const blink::WebRect& rect, | 22 const blink::WebRect& rect, |
23 const blink::WebThemeEngine::ExtraParams* extra_params) override; | 23 const blink::WebThemeEngine::ExtraParams* extra_params) override; |
24 void getOverlayScrollbarStyle( | 24 void getOverlayScrollbarStyle( |
25 blink::WebThemeEngine::ScrollbarStyle*) override; | 25 blink::WebThemeEngine::ScrollbarStyle*) override; |
| 26 bool supportsNinePatch(Part part) const override; |
| 27 blink::WebSize ninePatchCanvasSize(Part part) const override; |
| 28 blink::WebRect ninePatchAperture(Part part) const override; |
26 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
27 // Caches the scrollbar metrics. These are retrieved in the browser and passed | 30 // Caches the scrollbar metrics. These are retrieved in the browser and passed |
28 // to the renderer in RendererPreferences because the required Windows system | 31 // to the renderer in RendererPreferences because the required Windows system |
29 // calls cannot be made in sandboxed renderers. | 32 // calls cannot be made in sandboxed renderers. |
30 static void cacheScrollBarMetrics(int32_t vertical_scroll_bar_width, | 33 static void cacheScrollBarMetrics(int32_t vertical_scroll_bar_width, |
31 int32_t horizontal_scroll_bar_height, | 34 int32_t horizontal_scroll_bar_height, |
32 int32_t vertical_arrow_bitmap_height, | 35 int32_t vertical_arrow_bitmap_height, |
33 int32_t horizontal_arrow_bitmap_width); | 36 int32_t horizontal_arrow_bitmap_width); |
34 #endif | 37 #endif |
35 }; | 38 }; |
36 | 39 |
37 } // namespace content | 40 } // namespace content |
38 | 41 |
39 #endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ | 42 #endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ |
OLD | NEW |