OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/gpu/input_handler_wrapper.h" | 5 #include "content/renderer/gpu/input_handler_wrapper.h" |
6 | 6 |
7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
8 #include "content/renderer/gpu/input_event_filter.h" | 8 #include "content/renderer/gpu/input_event_filter.h" |
9 #include "content/renderer/gpu/input_handler_manager.h" | 9 #include "content/renderer/gpu/input_handler_manager.h" |
10 #include "third_party/WebKit/public/platform/Platform.h" | 10 #include "third_party/WebKit/public/platform/Platform.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 main_loop_(main_loop), | 23 main_loop_(main_loop), |
24 render_view_impl_(render_view_impl) { | 24 render_view_impl_(render_view_impl) { |
25 input_handler_proxy_.SetClient(this); | 25 input_handler_proxy_.SetClient(this); |
26 } | 26 } |
27 | 27 |
28 InputHandlerWrapper::~InputHandlerWrapper() { | 28 InputHandlerWrapper::~InputHandlerWrapper() { |
29 input_handler_proxy_.SetClient(NULL); | 29 input_handler_proxy_.SetClient(NULL); |
30 } | 30 } |
31 | 31 |
32 void InputHandlerWrapper::TransferActiveWheelFlingAnimation( | 32 void InputHandlerWrapper::TransferActiveWheelFlingAnimation( |
33 const WebKit::WebActiveWheelFlingParameters& params) { | 33 const blink::WebActiveWheelFlingParameters& params) { |
34 main_loop_->PostTask( | 34 main_loop_->PostTask( |
35 FROM_HERE, | 35 FROM_HERE, |
36 base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, | 36 base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, |
37 render_view_impl_, | 37 render_view_impl_, |
38 params)); | 38 params)); |
39 } | 39 } |
40 | 40 |
41 void InputHandlerWrapper::WillShutdown() { | 41 void InputHandlerWrapper::WillShutdown() { |
42 input_handler_manager_->RemoveInputHandler(routing_id_); | 42 input_handler_manager_->RemoveInputHandler(routing_id_); |
43 } | 43 } |
44 | 44 |
45 WebKit::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( | 45 blink::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( |
46 int deviceSource, | 46 int deviceSource, |
47 const WebKit::WebFloatPoint& velocity, | 47 const blink::WebFloatPoint& velocity, |
48 const WebKit::WebSize& cumulative_scroll) { | 48 const blink::WebSize& cumulative_scroll) { |
49 return WebKit::Platform::current()->createFlingAnimationCurve( | 49 return blink::Platform::current()->createFlingAnimationCurve( |
50 deviceSource, velocity, cumulative_scroll); | 50 deviceSource, velocity, cumulative_scroll); |
51 } | 51 } |
52 | 52 |
53 void InputHandlerWrapper::DidOverscroll(const cc::DidOverscrollParams& params) { | 53 void InputHandlerWrapper::DidOverscroll(const cc::DidOverscrollParams& params) { |
54 input_handler_manager_->DidOverscroll(routing_id_, params); | 54 input_handler_manager_->DidOverscroll(routing_id_, params); |
55 } | 55 } |
56 | 56 |
57 } // namespace content | 57 } // namespace content |
OLD | NEW |