| 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 if (gesture_event.data.scrollBegin.deltaHintUnits == | 574 if (gesture_event.data.scrollBegin.deltaHintUnits == |
| 575 blink::WebGestureEvent::ScrollUnits::Page) { | 575 blink::WebGestureEvent::ScrollUnits::Page) { |
| 576 scroll_status.thread = cc::InputHandler::SCROLL_ON_MAIN_THREAD; | 576 scroll_status.thread = cc::InputHandler::SCROLL_ON_MAIN_THREAD; |
| 577 scroll_status.main_thread_scrolling_reasons = | 577 scroll_status.main_thread_scrolling_reasons = |
| 578 cc::MainThreadScrollingReason::kContinuingMainThreadScroll; | 578 cc::MainThreadScrollingReason::kContinuingMainThreadScroll; |
| 579 } else if (gesture_event.data.scrollBegin.targetViewport) { | 579 } else if (gesture_event.data.scrollBegin.targetViewport) { |
| 580 scroll_status = input_handler_->RootScrollBegin( | 580 scroll_status = input_handler_->RootScrollBegin( |
| 581 &scroll_state, GestureScrollInputType(gesture_event.sourceDevice)); | 581 &scroll_state, GestureScrollInputType(gesture_event.sourceDevice)); |
| 582 } else if (ShouldAnimate(gesture_event.data.scrollBegin.deltaHintUnits != | 582 } else if (ShouldAnimate(gesture_event.data.scrollBegin.deltaHintUnits != |
| 583 blink::WebGestureEvent::ScrollUnits::Pixels)) { | 583 blink::WebGestureEvent::ScrollUnits::Pixels)) { |
| 584 DCHECK(!scroll_state.is_in_inertial_phase()); |
| 584 gfx::Point scroll_point(gesture_event.x, gesture_event.y); | 585 gfx::Point scroll_point(gesture_event.x, gesture_event.y); |
| 585 scroll_status = input_handler_->ScrollAnimatedBegin(scroll_point); | 586 scroll_status = input_handler_->ScrollAnimatedBegin(scroll_point); |
| 586 } else { | 587 } else { |
| 587 scroll_status = input_handler_->ScrollBegin( | 588 scroll_status = input_handler_->ScrollBegin( |
| 588 &scroll_state, GestureScrollInputType(gesture_event.sourceDevice)); | 589 &scroll_state, GestureScrollInputType(gesture_event.sourceDevice)); |
| 589 } | 590 } |
| 590 UMA_HISTOGRAM_ENUMERATION("Renderer4.CompositorScrollHitTestResult", | 591 UMA_HISTOGRAM_ENUMERATION("Renderer4.CompositorScrollHitTestResult", |
| 591 scroll_status.thread, | 592 scroll_status.thread, |
| 592 cc::InputHandler::LAST_SCROLL_STATUS + 1); | 593 cc::InputHandler::LAST_SCROLL_STATUS + 1); |
| 593 | 594 |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 // is made asynchronously, to minimize divergence between main thread and | 1338 // is made asynchronously, to minimize divergence between main thread and |
| 1338 // impl thread event handling paths. | 1339 // impl thread event handling paths. |
| 1339 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1340 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1340 FROM_HERE, | 1341 FROM_HERE, |
| 1341 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, | 1342 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, |
| 1342 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1343 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
| 1343 scroll_result)); | 1344 scroll_result)); |
| 1344 } | 1345 } |
| 1345 | 1346 |
| 1346 } // namespace ui | 1347 } // namespace ui |
| OLD | NEW |