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

Side by Side Diff: ui/events/blink/input_handler_proxy.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 "ui/events/blink/input_handler_proxy.h" 5 #include "ui/events/blink/input_handler_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 // Bundle overscroll message with triggering event response, saving an IPC. 1504 // Bundle overscroll message with triggering event response, saving an IPC.
1505 current_overscroll_params_.reset(new DidOverscrollParams()); 1505 current_overscroll_params_.reset(new DidOverscrollParams());
1506 current_overscroll_params_->accumulated_overscroll = 1506 current_overscroll_params_->accumulated_overscroll =
1507 scroll_result.accumulated_root_overscroll; 1507 scroll_result.accumulated_root_overscroll;
1508 current_overscroll_params_->latest_overscroll_delta = 1508 current_overscroll_params_->latest_overscroll_delta =
1509 scroll_result.unused_scroll_delta; 1509 scroll_result.unused_scroll_delta;
1510 current_overscroll_params_->current_fling_velocity = 1510 current_overscroll_params_->current_fling_velocity =
1511 ToClientScrollIncrement(current_fling_velocity_); 1511 ToClientScrollIncrement(current_fling_velocity_);
1512 current_overscroll_params_->causal_event_viewport_point = 1512 current_overscroll_params_->causal_event_viewport_point =
1513 gfx::PointF(causal_event_viewport_point); 1513 gfx::PointF(causal_event_viewport_point);
1514 current_overscroll_params_->scroll_boundary_behavior =
1515 scroll_result.scroll_boundary_behavior;
1514 return; 1516 return;
1515 } 1517 }
1516 1518
1517 client_->DidOverscroll(scroll_result.accumulated_root_overscroll, 1519 client_->DidOverscroll(scroll_result.accumulated_root_overscroll,
1518 scroll_result.unused_scroll_delta, 1520 scroll_result.unused_scroll_delta,
1519 ToClientScrollIncrement(current_fling_velocity_), 1521 ToClientScrollIncrement(current_fling_velocity_),
1520 gfx::PointF(causal_event_viewport_point)); 1522 gfx::PointF(causal_event_viewport_point),
1523 scroll_result.scroll_boundary_behavior);
1521 } 1524 }
1522 1525
1523 bool InputHandlerProxy::CancelCurrentFling() { 1526 bool InputHandlerProxy::CancelCurrentFling() {
1524 if (CancelCurrentFlingWithoutNotifyingClient()) { 1527 if (CancelCurrentFlingWithoutNotifyingClient()) {
1525 client_->DidStopFlinging(); 1528 client_->DidStopFlinging();
1526 return true; 1529 return true;
1527 } 1530 }
1528 return false; 1531 return false;
1529 } 1532 }
1530 1533
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, 1736 scroll_elasticity_controller_->GetWeakPtr(), gesture_event,
1734 scroll_result)); 1737 scroll_result));
1735 } 1738 }
1736 1739
1737 void InputHandlerProxy::SetTickClockForTesting( 1740 void InputHandlerProxy::SetTickClockForTesting(
1738 std::unique_ptr<base::TickClock> tick_clock) { 1741 std::unique_ptr<base::TickClock> tick_clock) {
1739 tick_clock_ = std::move(tick_clock); 1742 tick_clock_ = std::move(tick_clock);
1740 } 1743 }
1741 1744
1742 } // namespace ui 1745 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698