| OLD | NEW |
| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 // otherwise disrupt an in-progress touch scroll. | 370 // otherwise disrupt an in-progress touch scroll. |
| 371 if (fling_curve_) | 371 if (fling_curve_) |
| 372 CancelCurrentFling(); | 372 CancelCurrentFling(); |
| 373 } | 373 } |
| 374 break; | 374 break; |
| 375 } | 375 } |
| 376 | 376 |
| 377 return DID_NOT_HANDLE; | 377 return DID_NOT_HANDLE; |
| 378 } | 378 } |
| 379 | 379 |
| 380 void RecordMainThreadScrollingReasons(WebInputEvent::Type type, | 380 void InputHandlerProxy::RecordMainThreadScrollingReasons( |
| 381 uint32_t reasons) { | 381 WebInputEvent::Type type, |
| 382 uint32_t reasons) { |
| 382 static const char* kGestureHistogramName = | 383 static const char* kGestureHistogramName = |
| 383 "Renderer4.MainThreadGestureScrollReason"; | 384 "Renderer4.MainThreadGestureScrollReason"; |
| 384 static const char* kWheelHistogramName = | 385 static const char* kWheelHistogramName = |
| 385 "Renderer4.MainThreadWheelScrollReason"; | 386 "Renderer4.MainThreadWheelScrollReason"; |
| 386 | 387 |
| 387 DCHECK(type == WebInputEvent::GestureScrollBegin || | 388 DCHECK(type == WebInputEvent::GestureScrollBegin || |
| 388 type == WebInputEvent::MouseWheel); | 389 type == WebInputEvent::MouseWheel); |
| 389 | 390 |
| 390 if (type != WebInputEvent::GestureScrollBegin && | 391 if (type != WebInputEvent::GestureScrollBegin && |
| 391 type != WebInputEvent::MouseWheel) { | 392 type != WebInputEvent::MouseWheel) { |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 // trigger a scroll, e.g., with a trivial time delta between fling updates. | 1305 // trigger a scroll, e.g., with a trivial time delta between fling updates. |
| 1305 // Return true in this case to prevent early fling termination. | 1306 // Return true in this case to prevent early fling termination. |
| 1306 if (std::abs(clipped_increment.width) < kScrollEpsilon && | 1307 if (std::abs(clipped_increment.width) < kScrollEpsilon && |
| 1307 std::abs(clipped_increment.height) < kScrollEpsilon) | 1308 std::abs(clipped_increment.height) < kScrollEpsilon) |
| 1308 return true; | 1309 return true; |
| 1309 | 1310 |
| 1310 return did_scroll; | 1311 return did_scroll; |
| 1311 } | 1312 } |
| 1312 | 1313 |
| 1313 } // namespace ui | 1314 } // namespace ui |
| OLD | NEW |