OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/renderer/gpu/input_handler_wrapper.h" | |
6 | |
7 #include "content/renderer/gpu/input_event_filter.h" | |
8 #include "content/renderer/gpu/input_handler_manager.h" | |
9 | |
10 namespace content { | |
11 | |
12 InputHandlerWrapper::InputHandlerWrapper( | |
13 InputHandlerManager* input_handler_manager, | |
14 int routing_id, | |
15 const scoped_refptr<base::MessageLoopProxy>& main_loop, | |
16 const base::WeakPtr<cc::InputHandler>& input_handler, | |
17 const base::WeakPtr<RenderViewImpl>& render_view_impl) | |
18 : input_handler_manager_(input_handler_manager), | |
19 routing_id_(routing_id), | |
20 input_handler_(new InputHandlerClientImpl(input_handler.get())), | |
21 main_loop_(main_loop), | |
22 render_view_impl_(render_view_impl) { | |
23 input_handler_->SetClient(this); | |
24 } | |
25 | |
26 InputHandlerWrapper::~InputHandlerWrapper() { input_handler_->SetClient(NULL); } | |
27 | |
28 void InputHandlerWrapper::transferActiveWheelFlingAnimation( | |
29 const WebKit::WebActiveWheelFlingParameters& params) { | |
30 main_loop_->PostTask( | |
31 FROM_HERE, | |
32 base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, | |
33 render_view_impl_, | |
34 params)); | |
35 } | |
36 | |
37 void InputHandlerWrapper::willShutdown() { | |
38 input_handler_manager_->RemoveInputHandler(routing_id_); | |
39 } | |
40 | |
41 void InputHandlerWrapper::didHandleInputEvent() { | |
42 input_handler_manager_->filter()->DidHandleInputEvent(); | |
43 } | |
44 | |
45 void InputHandlerWrapper::didNotHandleInputEvent(bool send_to_widget) { | |
46 input_handler_manager_->filter()->DidNotHandleInputEvent(send_to_widget); | |
47 } | |
48 | |
49 WebKit::WebGestureCurve* InputHandlerWrapper::createFlingAnimationCurve( | |
50 int deviceSource, | |
51 const WebKit::WebFloatPoint& velocity, | |
52 const WebKit::WebSize& cumulativeScroll) { | |
53 return NULL; | |
danakj
2013/05/01 19:20:43
why's this so? Can the function just go away then
| |
54 } | |
55 | |
56 } // namespace content | |
OLD | NEW |