Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: content/renderer/input/input_handler_wrapper.cc

Issue 2341873002: Handle touchpad flings with passive event listeners on compositor thread. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/renderer/input/input_event_filter.h" 10 #include "content/renderer/input/input_event_filter.h"
(...skipping 28 matching lines...) Expand all
39 base::Bind(&RenderViewImpl::SetNeedsMainFrame, render_view_impl_)); 39 base::Bind(&RenderViewImpl::SetNeedsMainFrame, render_view_impl_));
40 } 40 }
41 41
42 void InputHandlerWrapper::TransferActiveWheelFlingAnimation( 42 void InputHandlerWrapper::TransferActiveWheelFlingAnimation(
43 const blink::WebActiveWheelFlingParameters& params) { 43 const blink::WebActiveWheelFlingParameters& params) {
44 main_task_runner_->PostTask( 44 main_task_runner_->PostTask(
45 FROM_HERE, base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, 45 FROM_HERE, base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation,
46 render_view_impl_, params)); 46 render_view_impl_, params));
47 } 47 }
48 48
49 void InputHandlerWrapper::DispatchNonBlockingEventToMainThread(
50 ui::ScopedWebInputEvent event) {
51 input_handler_manager_->DispatchNonBlockingEventToMainThread(
52 routing_id_, std::move(event));
53 }
54
49 void InputHandlerWrapper::WillShutdown() { 55 void InputHandlerWrapper::WillShutdown() {
50 input_handler_manager_->RemoveInputHandler(routing_id_); 56 input_handler_manager_->RemoveInputHandler(routing_id_);
51 } 57 }
52 58
53 blink::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( 59 blink::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve(
54 blink::WebGestureDevice deviceSource, 60 blink::WebGestureDevice deviceSource,
55 const blink::WebFloatPoint& velocity, 61 const blink::WebFloatPoint& velocity,
56 const blink::WebSize& cumulative_scroll) { 62 const blink::WebSize& cumulative_scroll) {
57 DidStartFlinging(); 63 DidStartFlinging();
58 return blink::Platform::current()->createFlingAnimationCurve( 64 return blink::Platform::current()->createFlingAnimationCurve(
(...skipping 19 matching lines...) Expand all
78 84
79 void InputHandlerWrapper::DidStopFlinging() { 85 void InputHandlerWrapper::DidStopFlinging() {
80 input_handler_manager_->DidStopFlinging(routing_id_); 86 input_handler_manager_->DidStopFlinging(routing_id_);
81 } 87 }
82 88
83 void InputHandlerWrapper::DidAnimateForInput() { 89 void InputHandlerWrapper::DidAnimateForInput() {
84 input_handler_manager_->DidAnimateForInput(); 90 input_handler_manager_->DidAnimateForInput();
85 } 91 }
86 92
87 } // namespace content 93 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698