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

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

Issue 2479023003: Remove is_fling flag for fling intervention (Closed)
Patch Set: Make enum explicitly Created 4 years, 1 month 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 void InputHandlerWrapper::WillShutdown() { 56 void InputHandlerWrapper::WillShutdown() {
57 input_handler_manager_->RemoveInputHandler(routing_id_); 57 input_handler_manager_->RemoveInputHandler(routing_id_);
58 } 58 }
59 59
60 blink::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( 60 blink::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve(
61 blink::WebGestureDevice deviceSource, 61 blink::WebGestureDevice deviceSource,
62 const blink::WebFloatPoint& velocity, 62 const blink::WebFloatPoint& velocity,
63 const blink::WebSize& cumulative_scroll) { 63 const blink::WebSize& cumulative_scroll) {
64 DidStartFlinging();
65 return blink::Platform::current()->createFlingAnimationCurve( 64 return blink::Platform::current()->createFlingAnimationCurve(
66 deviceSource, velocity, cumulative_scroll); 65 deviceSource, velocity, cumulative_scroll);
67 } 66 }
68 67
69 void InputHandlerWrapper::DidOverscroll( 68 void InputHandlerWrapper::DidOverscroll(
70 const gfx::Vector2dF& accumulated_overscroll, 69 const gfx::Vector2dF& accumulated_overscroll,
71 const gfx::Vector2dF& latest_overscroll_delta, 70 const gfx::Vector2dF& latest_overscroll_delta,
72 const gfx::Vector2dF& current_fling_velocity, 71 const gfx::Vector2dF& current_fling_velocity,
73 const gfx::PointF& causal_event_viewport_point) { 72 const gfx::PointF& causal_event_viewport_point) {
74 ui::DidOverscrollParams params; 73 ui::DidOverscrollParams params;
75 params.accumulated_overscroll = accumulated_overscroll; 74 params.accumulated_overscroll = accumulated_overscroll;
76 params.latest_overscroll_delta = latest_overscroll_delta; 75 params.latest_overscroll_delta = latest_overscroll_delta;
77 params.current_fling_velocity = current_fling_velocity; 76 params.current_fling_velocity = current_fling_velocity;
78 params.causal_event_viewport_point = causal_event_viewport_point; 77 params.causal_event_viewport_point = causal_event_viewport_point;
79 input_handler_manager_->DidOverscroll(routing_id_, params); 78 input_handler_manager_->DidOverscroll(routing_id_, params);
80 } 79 }
81 80
82 void InputHandlerWrapper::DidStartFlinging() {
83 input_handler_manager_->DidStartFlinging(routing_id_);
84 }
85
86 void InputHandlerWrapper::DidStopFlinging() { 81 void InputHandlerWrapper::DidStopFlinging() {
87 input_handler_manager_->DidStopFlinging(routing_id_); 82 input_handler_manager_->DidStopFlinging(routing_id_);
88 } 83 }
89 84
90 void InputHandlerWrapper::DidAnimateForInput() { 85 void InputHandlerWrapper::DidAnimateForInput() {
91 input_handler_manager_->DidAnimateForInput(); 86 input_handler_manager_->DidAnimateForInput();
92 } 87 }
93 88
94 } // namespace content 89 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_wrapper.h ('k') | content/renderer/input/main_thread_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698