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

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

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Rebase Created 3 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/widget_input_handler_manager.h" 5 #include "content/renderer/input/widget_input_handler_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const blink::WebFloatPoint& velocity, 151 const blink::WebFloatPoint& velocity,
152 const blink::WebSize& cumulative_scroll) { 152 const blink::WebSize& cumulative_scroll) {
153 return blink::Platform::Current()->CreateFlingAnimationCurve( 153 return blink::Platform::Current()->CreateFlingAnimationCurve(
154 device_source, velocity, cumulative_scroll); 154 device_source, velocity, cumulative_scroll);
155 } 155 }
156 156
157 void WidgetInputHandlerManager::DidOverscroll( 157 void WidgetInputHandlerManager::DidOverscroll(
158 const gfx::Vector2dF& accumulated_overscroll, 158 const gfx::Vector2dF& accumulated_overscroll,
159 const gfx::Vector2dF& latest_overscroll_delta, 159 const gfx::Vector2dF& latest_overscroll_delta,
160 const gfx::Vector2dF& current_fling_velocity, 160 const gfx::Vector2dF& current_fling_velocity,
161 const gfx::PointF& causal_event_viewport_point) { 161 const gfx::PointF& causal_event_viewport_point,
162 const cc::ScrollBoundaryBehavior& scroll_boundary_behavior) {
162 ui::DidOverscrollParams params; 163 ui::DidOverscrollParams params;
163 params.accumulated_overscroll = accumulated_overscroll; 164 params.accumulated_overscroll = accumulated_overscroll;
164 params.latest_overscroll_delta = latest_overscroll_delta; 165 params.latest_overscroll_delta = latest_overscroll_delta;
165 params.current_fling_velocity = current_fling_velocity; 166 params.current_fling_velocity = current_fling_velocity;
166 params.causal_event_viewport_point = causal_event_viewport_point; 167 params.causal_event_viewport_point = causal_event_viewport_point;
168 params.scroll_boundary_behavior = scroll_boundary_behavior;
167 if (legacy_host_message_sender_) { 169 if (legacy_host_message_sender_) {
168 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll( 170 legacy_host_message_sender_->Send(new InputHostMsg_DidOverscroll(
169 legacy_host_message_routing_id_, params)); 171 legacy_host_message_routing_id_, params));
170 } 172 }
171 } 173 }
172 174
173 void WidgetInputHandlerManager::DidStopFlinging() { 175 void WidgetInputHandlerManager::DidStopFlinging() {
174 if (legacy_host_message_sender_) { 176 if (legacy_host_message_sender_) {
175 legacy_host_message_sender_->Send( 177 legacy_host_message_sender_->Send(
176 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_)); 178 new InputHostMsg_DidStopFlinging(legacy_host_message_routing_id_));
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 356
355 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread( 357 void WidgetInputHandlerManager::ObserveGestureEventOnCompositorThread(
356 const blink::WebGestureEvent& gesture_event, 358 const blink::WebGestureEvent& gesture_event,
357 const cc::InputHandlerScrollResult& scroll_result) { 359 const cc::InputHandlerScrollResult& scroll_result) {
358 DCHECK(input_handler_proxy_->scroll_elasticity_controller()); 360 DCHECK(input_handler_proxy_->scroll_elasticity_controller());
359 input_handler_proxy_->scroll_elasticity_controller() 361 input_handler_proxy_->scroll_elasticity_controller()
360 ->ObserveGestureEventAndResult(gesture_event, scroll_result); 362 ->ObserveGestureEventAndResult(gesture_event, scroll_result);
361 } 363 }
362 364
363 } // namespace content 365 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/widget_input_handler_manager.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698