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

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

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 disallow_horizontal_fling_scroll_(false), 245 disallow_horizontal_fling_scroll_(false),
246 disallow_vertical_fling_scroll_(false), 246 disallow_vertical_fling_scroll_(false),
247 has_fling_animation_started_(false), 247 has_fling_animation_started_(false),
248 smooth_scroll_enabled_(false), 248 smooth_scroll_enabled_(false),
249 uma_latency_reporting_enabled_(base::TimeTicks::IsHighResolution()), 249 uma_latency_reporting_enabled_(base::TimeTicks::IsHighResolution()),
250 touch_start_result_(kEventDispositionUndefined), 250 touch_start_result_(kEventDispositionUndefined),
251 current_overscroll_params_(nullptr) { 251 current_overscroll_params_(nullptr) {
252 DCHECK(client); 252 DCHECK(client);
253 input_handler_->BindToClient(this); 253 input_handler_->BindToClient(this);
254 cc::ScrollElasticityHelper* scroll_elasticity_helper = 254 cc::ScrollElasticityHelper* scroll_elasticity_helper =
255 input_handler_->CreateScrollElasticityHelper(); 255 input_handler_->CreateRootScrollElasticityHelper();
256 if (scroll_elasticity_helper) { 256 if (scroll_elasticity_helper) {
257 scroll_elasticity_controller_.reset( 257 scroll_elasticity_controller_.reset(new InputScrollElasticityController());
258 new InputScrollElasticityController(scroll_elasticity_helper)); 258 scroll_elasticity_controller_->SetActiveHelper(
259 scroll_elasticity_helper->GetWeakPtr());
259 } 260 }
260 } 261 }
261 262
262 InputHandlerProxy::~InputHandlerProxy() {} 263 InputHandlerProxy::~InputHandlerProxy() {}
263 264
264 void InputHandlerProxy::WillShutdown() { 265 void InputHandlerProxy::WillShutdown() {
265 scroll_elasticity_controller_.reset(); 266 scroll_elasticity_controller_.reset();
266 input_handler_ = NULL; 267 input_handler_ = NULL;
267 client_->WillShutdown(); 268 client_->WillShutdown();
268 } 269 }
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 // is made asynchronously, to minimize divergence between main thread and 1392 // is made asynchronously, to minimize divergence between main thread and
1392 // impl thread event handling paths. 1393 // impl thread event handling paths.
1393 base::ThreadTaskRunnerHandle::Get()->PostTask( 1394 base::ThreadTaskRunnerHandle::Get()->PostTask(
1394 FROM_HERE, 1395 FROM_HERE,
1395 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, 1396 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult,
1396 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, 1397 scroll_elasticity_controller_->GetWeakPtr(), gesture_event,
1397 scroll_result)); 1398 scroll_result));
1398 } 1399 }
1399 1400
1400 } // namespace ui 1401 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/overscroll/ui_scroll_input_manager.cc ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698