| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/renderer/input/render_widget_input_handler.h" | 5 #include "content/renderer/input/render_widget_input_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { | 399 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { |
| 400 // |non_blocking| means it was ack'd already by the InputHandlerProxy | 400 // |non_blocking| means it was ack'd already by the InputHandlerProxy |
| 401 // so let the delegate know the event has been handled. | 401 // so let the delegate know the event has been handled. |
| 402 delegate_->NotifyInputEventHandled(input_event.type, ack_result); | 402 delegate_->NotifyInputEventHandled(input_event.type, ack_result); |
| 403 } | 403 } |
| 404 | 404 |
| 405 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || | 405 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || |
| 406 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { | 406 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { |
| 407 std::unique_ptr<InputEventAck> response(new InputEventAck( | 407 std::unique_ptr<InputEventAck> response(new InputEventAck( |
| 408 InputEventAckLocation::INPUT_EVENT_ACK_LOCATION_MAIN_THREAD, |
| 408 input_event.type, ack_result, swap_latency_info, | 409 input_event.type, ack_result, swap_latency_info, |
| 409 std::move(event_overscroll), | 410 std::move(event_overscroll), |
| 410 ui::WebInputEventTraits::GetUniqueTouchEventId(input_event))); | 411 ui::WebInputEventTraits::GetUniqueTouchEventId(input_event))); |
| 411 delegate_->OnInputEventAck(std::move(response)); | 412 delegate_->OnInputEventAck(std::move(response)); |
| 412 } else { | 413 } else { |
| 413 DCHECK(!event_overscroll) << "Unexpected overscroll for un-acked event"; | 414 DCHECK(!event_overscroll) << "Unexpected overscroll for un-acked event"; |
| 414 } | 415 } |
| 415 if (RenderThreadImpl::current()) { | 416 if (RenderThreadImpl::current()) { |
| 416 RenderThreadImpl::current() | 417 RenderThreadImpl::current() |
| 417 ->GetRendererScheduler() | 418 ->GetRendererScheduler() |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // it can be bundled in the event ack. | 470 // it can be bundled in the event ack. |
| 470 if (handling_event_overscroll_) { | 471 if (handling_event_overscroll_) { |
| 471 *handling_event_overscroll_ = std::move(params); | 472 *handling_event_overscroll_ = std::move(params); |
| 472 return; | 473 return; |
| 473 } | 474 } |
| 474 | 475 |
| 475 delegate_->OnDidOverscroll(*params); | 476 delegate_->OnDidOverscroll(*params); |
| 476 } | 477 } |
| 477 | 478 |
| 478 } // namespace content | 479 } // namespace content |
| OLD | NEW |