OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/input/input_handler_wrapper.h" | 5 #include "content/renderer/input/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/input/input_event_filter.h" | 8 #include "content/renderer/input/input_event_filter.h" |
9 #include "content/renderer/input/input_handler_manager.h" | 9 #include "content/renderer/input/input_handler_manager.h" |
10 #include "content/renderer/scheduler/renderer_scheduler.h" | 10 #include "content/renderer/scheduler/renderer_scheduler.h" |
11 #include "third_party/WebKit/public/platform/Platform.h" | 11 #include "third_party/WebKit/public/platform/Platform.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 InputHandlerWrapper::InputHandlerWrapper( | 15 InputHandlerWrapper::InputHandlerWrapper( |
16 InputHandlerManager* input_handler_manager, | 16 InputHandlerManager* input_handler_manager, |
17 int routing_id, | 17 int routing_id, |
18 const scoped_refptr<base::MessageLoopProxy>& main_loop, | 18 const scoped_refptr<base::MessageLoopProxy>& main_loop, |
19 const base::WeakPtr<cc::InputHandler>& input_handler, | 19 const base::WeakPtr<cc::InputHandler>& input_handler, |
20 const base::WeakPtr<RenderViewImpl>& render_view_impl, | 20 const base::WeakPtr<RenderViewImpl>& render_view_impl, |
21 RendererScheduler* render_scheduler) | 21 RendererScheduler* renderer_scheduler) |
22 : input_handler_manager_(input_handler_manager), | 22 : input_handler_manager_(input_handler_manager), |
23 routing_id_(routing_id), | 23 routing_id_(routing_id), |
24 input_handler_proxy_(input_handler.get(), this), | 24 input_handler_proxy_(input_handler.get(), this), |
25 main_loop_(main_loop), | 25 main_loop_(main_loop), |
26 render_view_impl_(render_view_impl), | 26 render_view_impl_(render_view_impl), |
27 render_scheduler_(render_scheduler) { | 27 renderer_scheduler_(renderer_scheduler) { |
28 DCHECK(input_handler); | 28 DCHECK(input_handler); |
29 } | 29 } |
30 | 30 |
31 InputHandlerWrapper::~InputHandlerWrapper() { | 31 InputHandlerWrapper::~InputHandlerWrapper() { |
32 } | 32 } |
33 | 33 |
34 void InputHandlerWrapper::TransferActiveWheelFlingAnimation( | 34 void InputHandlerWrapper::TransferActiveWheelFlingAnimation( |
35 const blink::WebActiveWheelFlingParameters& params) { | 35 const blink::WebActiveWheelFlingParameters& params) { |
36 main_loop_->PostTask( | 36 main_loop_->PostTask( |
37 FROM_HERE, | 37 FROM_HERE, |
(...skipping 16 matching lines...) Expand all Loading... | |
54 | 54 |
55 void InputHandlerWrapper::DidOverscroll(const DidOverscrollParams& params) { | 55 void InputHandlerWrapper::DidOverscroll(const DidOverscrollParams& params) { |
56 input_handler_manager_->DidOverscroll(routing_id_, params); | 56 input_handler_manager_->DidOverscroll(routing_id_, params); |
57 } | 57 } |
58 | 58 |
59 void InputHandlerWrapper::DidStopFlinging() { | 59 void InputHandlerWrapper::DidStopFlinging() { |
60 input_handler_manager_->DidStopFlinging(routing_id_); | 60 input_handler_manager_->DidStopFlinging(routing_id_); |
61 } | 61 } |
62 | 62 |
63 void InputHandlerWrapper::DidReceiveInputEvent() { | 63 void InputHandlerWrapper::DidReceiveInputEvent() { |
64 if (render_scheduler_) { | 64 if (renderer_scheduler_) { |
65 render_scheduler_->DidReceiveInputEvent(); | 65 renderer_scheduler_->DidReceiveInputEvent(); |
jdduke (slow)
2014/11/04 01:21:02
Nit: No braces necessary (also below).
alex clarke (OOO till 29th)
2014/11/04 01:49:06
I slightly prefer this style, because I've seen bu
| |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 void InputHandlerWrapper::DidAnimate() { | |
70 if (renderer_scheduler_) { | |
71 renderer_scheduler_->DidAnimate(); | |
72 } | |
73 } | |
74 | |
69 } // namespace content | 75 } // namespace content |
OLD | NEW |