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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 TRACE_EVENT_SYNTHETIC_DELAY_END("blink.HandleInputEvent"); | 421 TRACE_EVENT_SYNTHETIC_DELAY_END("blink.HandleInputEvent"); |
422 | 422 |
423 // Note that we can't use handling_event_type_ here since it will be overriden | 423 // Note that we can't use handling_event_type_ here since it will be overriden |
424 // by reentrant calls for events after the paused one. | 424 // by reentrant calls for events after the paused one. |
425 bool can_send_ack = !(ignore_ack_for_mouse_move_from_debugger_ && | 425 bool can_send_ack = !(ignore_ack_for_mouse_move_from_debugger_ && |
426 input_event.type == WebInputEvent::MouseMove); | 426 input_event.type == WebInputEvent::MouseMove); |
427 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN || | 427 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN || |
428 dispatch_type == DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN) { | 428 dispatch_type == DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN) { |
429 // |non_blocking| means it was ack'd already by the InputHandlerProxy | 429 // |non_blocking| means it was ack'd already by the InputHandlerProxy |
430 // so let the delegate know the event has been handled. | 430 // so let the delegate know the event has been handled. |
431 delegate_->NotifyInputEventHandled(input_event.type); | 431 delegate_->NotifyInputEventHandled(input_event.type, ack_result); |
432 } | 432 } |
433 | 433 |
434 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || | 434 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || |
435 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) && | 435 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) && |
436 can_send_ack) { | 436 can_send_ack) { |
437 std::unique_ptr<InputEventAck> response(new InputEventAck( | 437 std::unique_ptr<InputEventAck> response(new InputEventAck( |
438 input_event.type, ack_result, swap_latency_info, | 438 input_event.type, ack_result, swap_latency_info, |
439 std::move(event_overscroll), | 439 std::move(event_overscroll), |
440 WebInputEventTraits::GetUniqueTouchEventId(input_event))); | 440 WebInputEventTraits::GetUniqueTouchEventId(input_event))); |
441 if (rate_limiting_wanted && frame_pending && !widget_->is_hidden()) { | 441 if (rate_limiting_wanted && frame_pending && !widget_->is_hidden()) { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 if (pending_input_event_ack_) { | 555 if (pending_input_event_ack_) { |
556 TRACE_EVENT_ASYNC_END0("input", | 556 TRACE_EVENT_ASYNC_END0("input", |
557 "RenderWidgetInputHandler::ThrottledInputEventAck", | 557 "RenderWidgetInputHandler::ThrottledInputEventAck", |
558 pending_input_event_ack_.get()); | 558 pending_input_event_ack_.get()); |
559 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); | 559 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); |
560 } | 560 } |
561 total_input_handling_time_this_frame_ = base::TimeDelta(); | 561 total_input_handling_time_this_frame_ = base::TimeDelta(); |
562 } | 562 } |
563 | 563 |
564 } // namespace content | 564 } // namespace content |
OLD | NEW |