Chromium Code Reviews| 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 #include "ui/native_theme/native_theme.h" | |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 class WebThemeEngineImpl : public blink::WebThemeEngine { | 16 class WebThemeEngineImpl : public blink::WebThemeEngine { |
| 16 public: | 17 public: |
| 17 // WebThemeEngine methods: | 18 // WebThemeEngine methods: |
| 18 blink::WebSize getSize(blink::WebThemeEngine::Part) override; | 19 blink::WebSize getSize(blink::WebThemeEngine::Part) override; |
| 19 void paint(blink::WebCanvas* canvas, | 20 void paint(blink::WebCanvas* canvas, |
| 20 blink::WebThemeEngine::Part part, | 21 blink::WebThemeEngine::Part part, |
| 21 blink::WebThemeEngine::State state, | 22 blink::WebThemeEngine::State state, |
| 22 const blink::WebRect& rect, | 23 const blink::WebRect& rect, |
| 23 const blink::WebThemeEngine::ExtraParams* extra_params) override; | 24 const blink::WebThemeEngine::ExtraParams* extra_params) override; |
| 24 virtual void paintStateTransition(blink::WebCanvas* canvas, | 25 virtual void paintStateTransition( |
| 25 blink::WebThemeEngine::Part part, | 26 blink::WebCanvas* canvas, |
| 26 blink::WebThemeEngine::State startState, | 27 blink::WebThemeEngine::Part part, |
| 27 blink::WebThemeEngine::State endState, | 28 blink::WebThemeEngine::State startState, |
| 28 double progress, | 29 blink::WebThemeEngine::State endState, |
| 29 const blink::WebRect& rect); | 30 double progress, |
| 31 const blink::WebRect& rect, | |
| 32 ui::NativeTheme::ScrollbarOverlayColorTheme theme); | |
|
bokan
2016/10/21 16:57:14
This should take a blink::WebThemeEngine::Scrollba
| |
| 30 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 31 // Caches the scrollbar metrics. These are retrieved in the browser and passed | 34 // Caches the scrollbar metrics. These are retrieved in the browser and passed |
| 32 // to the renderer in RendererPreferences because the required Windows system | 35 // to the renderer in RendererPreferences because the required Windows system |
| 33 // calls cannot be made in sandboxed renderers. | 36 // calls cannot be made in sandboxed renderers. |
| 34 static void cacheScrollBarMetrics(int32_t vertical_scroll_bar_width, | 37 static void cacheScrollBarMetrics(int32_t vertical_scroll_bar_width, |
| 35 int32_t horizontal_scroll_bar_height, | 38 int32_t horizontal_scroll_bar_height, |
| 36 int32_t vertical_arrow_bitmap_height, | 39 int32_t vertical_arrow_bitmap_height, |
| 37 int32_t horizontal_arrow_bitmap_width); | 40 int32_t horizontal_arrow_bitmap_width); |
| 38 #endif | 41 #endif |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 } // namespace content | 44 } // namespace content |
| 42 | 45 |
| 43 #endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ | 46 #endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ |
| OLD | NEW |