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 "content/renderer/gpu/input_event_filter.h" | 7 #include "content/renderer/gpu/input_event_filter.h" |
8 #include "content/renderer/gpu/input_handler_manager.h" | 8 #include "content/renderer/gpu/input_handler_manager.h" |
9 #include "third_party/WebKit/public/platform/Platform.h" | 9 #include "third_party/WebKit/public/platform/Platform.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 FROM_HERE, | 34 FROM_HERE, |
35 base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, | 35 base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, |
36 render_view_impl_, | 36 render_view_impl_, |
37 params)); | 37 params)); |
38 } | 38 } |
39 | 39 |
40 void InputHandlerWrapper::WillShutdown() { | 40 void InputHandlerWrapper::WillShutdown() { |
41 input_handler_manager_->RemoveInputHandler(routing_id_); | 41 input_handler_manager_->RemoveInputHandler(routing_id_); |
42 } | 42 } |
43 | 43 |
44 void InputHandlerWrapper::DidHandleInputEvent() { | |
45 input_handler_manager_->filter()->DidHandleInputEvent(); | |
46 } | |
47 | |
48 void InputHandlerWrapper::DidNotHandleInputEvent(bool send_to_widget) { | |
49 input_handler_manager_->filter()->DidNotHandleInputEvent(send_to_widget); | |
50 } | |
51 | |
52 WebKit::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( | 44 WebKit::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( |
53 int deviceSource, | 45 int deviceSource, |
54 const WebKit::WebFloatPoint& velocity, | 46 const WebKit::WebFloatPoint& velocity, |
55 const WebKit::WebSize& cumulative_scroll) { | 47 const WebKit::WebSize& cumulative_scroll) { |
56 return WebKit::Platform::current()->createFlingAnimationCurve( | 48 return WebKit::Platform::current()->createFlingAnimationCurve( |
57 deviceSource, velocity, cumulative_scroll); | 49 deviceSource, velocity, cumulative_scroll); |
58 } | 50 } |
59 | 51 |
60 void InputHandlerWrapper::DidOverscroll(gfx::Vector2dF accumulated_overscroll, | 52 void InputHandlerWrapper::DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
61 gfx::Vector2dF current_fling_velocity) { | 53 gfx::Vector2dF current_fling_velocity) { |
62 main_loop_->PostTask( | 54 main_loop_->PostTask( |
63 FROM_HERE, | 55 FROM_HERE, |
64 base::Bind(&RenderViewImpl::DidOverscroll, | 56 base::Bind(&RenderViewImpl::DidOverscroll, |
65 render_view_impl_, | 57 render_view_impl_, |
66 accumulated_overscroll, current_fling_velocity)); | 58 accumulated_overscroll, current_fling_velocity)); |
67 } | 59 } |
68 | 60 |
69 } // namespace content | 61 } // namespace content |
OLD | NEW |