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

Side by Side Diff: ui/events/blink/input_handler_proxy.cc

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 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
« no previous file with comments | « ui/events/blink/DEPS ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 fling_may_be_active_on_main_thread_(false), 236 fling_may_be_active_on_main_thread_(false),
237 disallow_horizontal_fling_scroll_(false), 237 disallow_horizontal_fling_scroll_(false),
238 disallow_vertical_fling_scroll_(false), 238 disallow_vertical_fling_scroll_(false),
239 has_fling_animation_started_(false), 239 has_fling_animation_started_(false),
240 smooth_scroll_enabled_(false), 240 smooth_scroll_enabled_(false),
241 uma_latency_reporting_enabled_(base::TimeTicks::IsHighResolution()), 241 uma_latency_reporting_enabled_(base::TimeTicks::IsHighResolution()),
242 touch_start_result_(kEventDispositionUndefined) { 242 touch_start_result_(kEventDispositionUndefined) {
243 DCHECK(client); 243 DCHECK(client);
244 input_handler_->BindToClient(this); 244 input_handler_->BindToClient(this);
245 cc::ScrollElasticityHelper* scroll_elasticity_helper = 245 cc::ScrollElasticityHelper* scroll_elasticity_helper =
246 input_handler_->CreateScrollElasticityHelper(); 246 input_handler_->CreateRootScrollElasticityHelper();
247 if (scroll_elasticity_helper) { 247 if (scroll_elasticity_helper) {
248 scroll_elasticity_controller_.reset( 248 scroll_elasticity_controller_.reset(new InputScrollElasticityController());
249 new InputScrollElasticityController(scroll_elasticity_helper)); 249 scroll_elasticity_controller_->SetActiveHelper(
250 scroll_elasticity_helper->GetWeakPtr());
250 } 251 }
251 } 252 }
252 253
253 InputHandlerProxy::~InputHandlerProxy() {} 254 InputHandlerProxy::~InputHandlerProxy() {}
254 255
255 void InputHandlerProxy::WillShutdown() { 256 void InputHandlerProxy::WillShutdown() {
256 scroll_elasticity_controller_.reset(); 257 scroll_elasticity_controller_.reset();
257 input_handler_ = NULL; 258 input_handler_ = NULL;
258 client_->WillShutdown(); 259 client_->WillShutdown();
259 } 260 }
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 // is made asynchronously, to minimize divergence between main thread and 1341 // is made asynchronously, to minimize divergence between main thread and
1341 // impl thread event handling paths. 1342 // impl thread event handling paths.
1342 base::ThreadTaskRunnerHandle::Get()->PostTask( 1343 base::ThreadTaskRunnerHandle::Get()->PostTask(
1343 FROM_HERE, 1344 FROM_HERE,
1344 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, 1345 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult,
1345 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, 1346 scroll_elasticity_controller_->GetWeakPtr(), gesture_event,
1346 scroll_result)); 1347 scroll_result));
1347 } 1348 }
1348 1349
1349 } // namespace ui 1350 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/blink/DEPS ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698