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

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

Issue 2297943002: Rename kAnimatingScrollOnMainThread to kHandlingScrollFromMainThread (Closed)
Patch Set: update more comments Created 4 years, 3 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 cc::MainThreadScrollingReason::kNotScrollingOnMain, 420 cc::MainThreadScrollingReason::kNotScrollingOnMain,
421 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); 421 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount);
422 } 422 }
423 } 423 }
424 424
425 for (uint32_t i = 0; 425 for (uint32_t i = 0;
426 i < cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount - 1; 426 i < cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount - 1;
427 ++i) { 427 ++i) {
428 unsigned val = 1 << i; 428 unsigned val = 1 << i;
429 if (reasons & val) { 429 if (reasons & val) {
430 if (val == cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread) { 430 if (val == cc::MainThreadScrollingReason::kHandlingScrollFromMainThread) {
431 // We only want to record "animating scroll on main thread" reason if 431 // We only want to record "Handling scroll from main thread" reason if
432 // it's the only reason. If it's not the only reason, the "real" reason 432 // it's the only reason. If it's not the only reason, the "real" reason
433 // for scrolling on main is something else, and we only want to pay 433 // for scrolling on main is something else, and we only want to pay
434 // attention to that reason. 434 // attention to that reason.
435 if (reasons & ~val) 435 if (reasons & ~val)
436 continue; 436 continue;
437 } 437 }
438 if (device == blink::WebGestureDeviceTouchscreen) { 438 if (device == blink::WebGestureDeviceTouchscreen) {
439 UMA_HISTOGRAM_ENUMERATION( 439 UMA_HISTOGRAM_ENUMERATION(
440 kGestureHistogramName, i + 1, 440 kGestureHistogramName, i + 1,
441 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount); 441 cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount);
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 // is made asynchronously, to minimize divergence between main thread and 1337 // is made asynchronously, to minimize divergence between main thread and
1338 // impl thread event handling paths. 1338 // impl thread event handling paths.
1339 base::ThreadTaskRunnerHandle::Get()->PostTask( 1339 base::ThreadTaskRunnerHandle::Get()->PostTask(
1340 FROM_HERE, 1340 FROM_HERE,
1341 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, 1341 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult,
1342 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, 1342 scroll_elasticity_controller_->GetWeakPtr(), gesture_event,
1343 scroll_result)); 1343 scroll_result));
1344 } 1344 }
1345 1345
1346 } // namespace ui 1346 } // namespace ui
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698