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

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: Update input_messages with the order in the enum. Created 3 years, 4 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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 // Bundle overscroll message with triggering event response, saving an IPC. 1450 // Bundle overscroll message with triggering event response, saving an IPC.
1451 current_overscroll_params_.reset(new DidOverscrollParams()); 1451 current_overscroll_params_.reset(new DidOverscrollParams());
1452 current_overscroll_params_->accumulated_overscroll = 1452 current_overscroll_params_->accumulated_overscroll =
1453 scroll_result.accumulated_root_overscroll; 1453 scroll_result.accumulated_root_overscroll;
1454 current_overscroll_params_->latest_overscroll_delta = 1454 current_overscroll_params_->latest_overscroll_delta =
1455 scroll_result.unused_scroll_delta; 1455 scroll_result.unused_scroll_delta;
1456 current_overscroll_params_->current_fling_velocity = 1456 current_overscroll_params_->current_fling_velocity =
1457 ToClientScrollIncrement(current_fling_velocity_); 1457 ToClientScrollIncrement(current_fling_velocity_);
1458 current_overscroll_params_->causal_event_viewport_point = 1458 current_overscroll_params_->causal_event_viewport_point =
1459 gfx::PointF(causal_event_viewport_point); 1459 gfx::PointF(causal_event_viewport_point);
1460 current_overscroll_params_->scroll_boundary_behavior =
1461 scroll_result.scroll_boundary_behavior;
1460 return; 1462 return;
1461 } 1463 }
1462 1464
1463 client_->DidOverscroll(scroll_result.accumulated_root_overscroll, 1465 client_->DidOverscroll(scroll_result.accumulated_root_overscroll,
1464 scroll_result.unused_scroll_delta, 1466 scroll_result.unused_scroll_delta,
1465 ToClientScrollIncrement(current_fling_velocity_), 1467 ToClientScrollIncrement(current_fling_velocity_),
1466 gfx::PointF(causal_event_viewport_point)); 1468 gfx::PointF(causal_event_viewport_point),
1469 scroll_result.scroll_boundary_behavior);
1467 } 1470 }
1468 1471
1469 bool InputHandlerProxy::CancelCurrentFling() { 1472 bool InputHandlerProxy::CancelCurrentFling() {
1470 if (CancelCurrentFlingWithoutNotifyingClient()) { 1473 if (CancelCurrentFlingWithoutNotifyingClient()) {
1471 client_->DidStopFlinging(); 1474 client_->DidStopFlinging();
1472 return true; 1475 return true;
1473 } 1476 }
1474 return false; 1477 return false;
1475 } 1478 }
1476 1479
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, 1682 scroll_elasticity_controller_->GetWeakPtr(), gesture_event,
1680 scroll_result)); 1683 scroll_result));
1681 } 1684 }
1682 1685
1683 void InputHandlerProxy::SetTickClockForTesting( 1686 void InputHandlerProxy::SetTickClockForTesting(
1684 std::unique_ptr<base::TickClock> tick_clock) { 1687 std::unique_ptr<base::TickClock> tick_clock) {
1685 tick_clock_ = std::move(tick_clock); 1688 tick_clock_ = std::move(tick_clock);
1686 } 1689 }
1687 1690
1688 } // namespace ui 1691 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698