| 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 TRACE_EVENT_SYNTHETIC_DELAY_END("blink.HandleInputEvent"); | 431 TRACE_EVENT_SYNTHETIC_DELAY_END("blink.HandleInputEvent"); |
| 432 | 432 |
| 433 // Note that we can't use handling_event_type_ here since it will be overriden | 433 // Note that we can't use handling_event_type_ here since it will be overriden |
| 434 // by reentrant calls for events after the paused one. | 434 // by reentrant calls for events after the paused one. |
| 435 bool can_send_ack = !(ignore_ack_for_mouse_move_from_debugger_ && | 435 bool can_send_ack = !(ignore_ack_for_mouse_move_from_debugger_ && |
| 436 input_event.type == WebInputEvent::MouseMove); | 436 input_event.type == WebInputEvent::MouseMove); |
| 437 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN || | 437 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN || |
| 438 dispatch_type == DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN) { | 438 dispatch_type == DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN) { |
| 439 // |non_blocking| means it was ack'd already by the InputHandlerProxy | 439 // |non_blocking| means it was ack'd already by the InputHandlerProxy |
| 440 // so let the delegate know the event has been handled. | 440 // so let the delegate know the event has been handled. |
| 441 delegate_->NotifyInputEventHandled(input_event.type); | 441 delegate_->NotifyInputEventHandled(input_event.type, ack_result); |
| 442 } | 442 } |
| 443 | 443 |
| 444 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || | 444 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || |
| 445 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) && | 445 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) && |
| 446 can_send_ack) { | 446 can_send_ack) { |
| 447 std::unique_ptr<InputEventAck> response(new InputEventAck( | 447 std::unique_ptr<InputEventAck> response(new InputEventAck( |
| 448 input_event.type, ack_result, swap_latency_info, | 448 input_event.type, ack_result, swap_latency_info, |
| 449 std::move(event_overscroll), | 449 std::move(event_overscroll), |
| 450 WebInputEventTraits::GetUniqueTouchEventId(input_event))); | 450 WebInputEventTraits::GetUniqueTouchEventId(input_event))); |
| 451 if (rate_limiting_wanted && frame_pending && !widget_->is_hidden()) { | 451 if (rate_limiting_wanted && frame_pending && !widget_->is_hidden()) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 if (pending_input_event_ack_) { | 565 if (pending_input_event_ack_) { |
| 566 TRACE_EVENT_ASYNC_END0("input", | 566 TRACE_EVENT_ASYNC_END0("input", |
| 567 "RenderWidgetInputHandler::ThrottledInputEventAck", | 567 "RenderWidgetInputHandler::ThrottledInputEventAck", |
| 568 pending_input_event_ack_.get()); | 568 pending_input_event_ack_.get()); |
| 569 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); | 569 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); |
| 570 } | 570 } |
| 571 total_input_handling_time_this_frame_ = base::TimeDelta(); | 571 total_input_handling_time_this_frame_ = base::TimeDelta(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 } // namespace content | 574 } // namespace content |
| OLD | NEW |