OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "webkit/compositor_bindings/web_to_ccinput_handler_adapter.h" | 5 #include "webkit/compositor_bindings/web_to_ccinput_handler_adapter.h" |
6 | 6 |
7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie
nt.h" | 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie
nt.h" |
8 | 8 |
9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ | 9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ |
10 COMPILE_ASSERT(int(WebKit::webkit_name) == int(cc::cc_name), mismatching_enu
ms) | 10 COMPILE_ASSERT(int(WebKit::webkit_name) == int(cc::cc_name), mismatching_enu
ms) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 { | 42 { |
43 } | 43 } |
44 | 44 |
45 virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERR
IDE | 45 virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERR
IDE |
46 { | 46 { |
47 return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scroll
Begin(point, static_cast<cc::InputHandlerClient::ScrollInputType>(type))); | 47 return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scroll
Begin(point, static_cast<cc::InputHandlerClient::ScrollInputType>(type))); |
48 } | 48 } |
49 | 49 |
50 virtual bool scrollByIfPossible(WebPoint point, WebSize offset) OVERRIDE | 50 virtual bool scrollByIfPossible(WebPoint point, WebSize offset) OVERRIDE |
51 { | 51 { |
52 return m_client->scrollBy(point, offset); | 52 return m_client->scrollBy(point, offset, true); |
| 53 } |
| 54 |
| 55 virtual bool scrollByIfPossible(WebPoint point, WebSize offset, bool shouldB
ubble) OVERRIDE |
| 56 { |
| 57 return m_client->scrollBy(point, offset, shouldBubble); |
53 } | 58 } |
54 | 59 |
55 virtual void scrollEnd() OVERRIDE | 60 virtual void scrollEnd() OVERRIDE |
56 { | 61 { |
57 m_client->scrollEnd(); | 62 m_client->scrollEnd(); |
58 } | 63 } |
59 | 64 |
60 virtual void pinchGestureBegin() OVERRIDE | 65 virtual void pinchGestureBegin() OVERRIDE |
61 { | 66 { |
62 m_client->pinchGestureBegin(); | 67 m_client->pinchGestureBegin(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); | 114 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); |
110 m_handler->animate(monotonicTimeSeconds); | 115 m_handler->animate(monotonicTimeSeconds); |
111 } | 116 } |
112 | 117 |
113 void WebToCCInputHandlerAdapter::mainThreadHasStoppedFlinging() | 118 void WebToCCInputHandlerAdapter::mainThreadHasStoppedFlinging() |
114 { | 119 { |
115 m_handler->mainThreadHasStoppedFlinging(); | 120 m_handler->mainThreadHasStoppedFlinging(); |
116 } | 121 } |
117 | 122 |
118 } // namespace WebKit | 123 } // namespace WebKit |
OLD | NEW |