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

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

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: rebase Created 3 years, 5 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_features.h" 9 #include "content/public/common/content_features.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const blink::WebFloatPoint& velocity, 67 const blink::WebFloatPoint& velocity,
68 const blink::WebSize& cumulative_scroll) { 68 const blink::WebSize& cumulative_scroll) {
69 return blink::Platform::Current()->CreateFlingAnimationCurve( 69 return blink::Platform::Current()->CreateFlingAnimationCurve(
70 deviceSource, velocity, cumulative_scroll); 70 deviceSource, velocity, cumulative_scroll);
71 } 71 }
72 72
73 void InputHandlerWrapper::DidOverscroll( 73 void InputHandlerWrapper::DidOverscroll(
74 const gfx::Vector2dF& accumulated_overscroll, 74 const gfx::Vector2dF& accumulated_overscroll,
75 const gfx::Vector2dF& latest_overscroll_delta, 75 const gfx::Vector2dF& latest_overscroll_delta,
76 const gfx::Vector2dF& current_fling_velocity, 76 const gfx::Vector2dF& current_fling_velocity,
77 const gfx::PointF& causal_event_viewport_point) { 77 const gfx::PointF& causal_event_viewport_point,
78 const cc::ScrollBoundaryBehavior& scroll_boundary_behavior) {
78 ui::DidOverscrollParams params; 79 ui::DidOverscrollParams params;
79 params.accumulated_overscroll = accumulated_overscroll; 80 params.accumulated_overscroll = accumulated_overscroll;
80 params.latest_overscroll_delta = latest_overscroll_delta; 81 params.latest_overscroll_delta = latest_overscroll_delta;
81 params.current_fling_velocity = current_fling_velocity; 82 params.current_fling_velocity = current_fling_velocity;
82 params.causal_event_viewport_point = causal_event_viewport_point; 83 params.causal_event_viewport_point = causal_event_viewport_point;
84 params.scroll_boundary_behavior = scroll_boundary_behavior;
83 input_handler_manager_->DidOverscroll(routing_id_, params); 85 input_handler_manager_->DidOverscroll(routing_id_, params);
84 } 86 }
85 87
86 void InputHandlerWrapper::DidStopFlinging() { 88 void InputHandlerWrapper::DidStopFlinging() {
87 input_handler_manager_->DidStopFlinging(routing_id_); 89 input_handler_manager_->DidStopFlinging(routing_id_);
88 } 90 }
89 91
90 void InputHandlerWrapper::DidAnimateForInput() { 92 void InputHandlerWrapper::DidAnimateForInput() {
91 input_handler_manager_->DidAnimateForInput(); 93 input_handler_manager_->DidAnimateForInput();
92 } 94 }
(...skipping 15 matching lines...) Expand all
108 DispatchNonBlockingEventToMainThread( 110 DispatchNonBlockingEventToMainThread(
109 ui::WebInputEventTraits::Clone(scroll_begin), ui::LatencyInfo()); 111 ui::WebInputEventTraits::Clone(scroll_begin), ui::LatencyInfo());
110 } 112 }
111 113
112 void InputHandlerWrapper::SetWhiteListedTouchAction( 114 void InputHandlerWrapper::SetWhiteListedTouchAction(
113 cc::TouchAction touch_action) { 115 cc::TouchAction touch_action) {
114 input_handler_manager_->SetWhiteListedTouchAction(routing_id_, touch_action); 116 input_handler_manager_->SetWhiteListedTouchAction(routing_id_, touch_action);
115 } 117 }
116 118
117 } // namespace content 119 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698