| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 prevent_default = | 315 prevent_default = |
| 316 prevent_default || delegate_->WillHandleGestureEvent(gesture_event); | 316 prevent_default || delegate_->WillHandleGestureEvent(gesture_event); |
| 317 } | 317 } |
| 318 | 318 |
| 319 WebInputEventResult processed = prevent_default | 319 WebInputEventResult processed = prevent_default |
| 320 ? WebInputEventResult::HandledSuppressed | 320 ? WebInputEventResult::HandledSuppressed |
| 321 : WebInputEventResult::NotHandled; | 321 : WebInputEventResult::NotHandled; |
| 322 if (input_event.type != WebInputEvent::Char || !suppress_next_char_events_) { | 322 if (input_event.type != WebInputEvent::Char || !suppress_next_char_events_) { |
| 323 suppress_next_char_events_ = false; | 323 suppress_next_char_events_ = false; |
| 324 if (processed == WebInputEventResult::NotHandled && widget_->webwidget()) | 324 if (processed == WebInputEventResult::NotHandled && widget_->GetWebWidget()) |
| 325 processed = widget_->webwidget()->handleInputEvent(input_event); | 325 processed = widget_->GetWebWidget()->handleInputEvent(input_event); |
| 326 } | 326 } |
| 327 | 327 |
| 328 // TODO(dtapuska): Use the input_event.timeStampSeconds as the start | 328 // TODO(dtapuska): Use the input_event.timeStampSeconds as the start |
| 329 // ideally this should be when the event was sent by the compositor to the | 329 // ideally this should be when the event was sent by the compositor to the |
| 330 // renderer. crbug.com/565348 | 330 // renderer. crbug.com/565348 |
| 331 if (input_event.type == WebInputEvent::TouchStart || | 331 if (input_event.type == WebInputEvent::TouchStart || |
| 332 input_event.type == WebInputEvent::TouchMove || | 332 input_event.type == WebInputEvent::TouchMove || |
| 333 input_event.type == WebInputEvent::TouchEnd) { | 333 input_event.type == WebInputEvent::TouchEnd) { |
| 334 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event); | 334 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event); |
| 335 | 335 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 if (pending_input_event_ack_) { | 552 if (pending_input_event_ack_) { |
| 553 TRACE_EVENT_ASYNC_END0("input", | 553 TRACE_EVENT_ASYNC_END0("input", |
| 554 "RenderWidgetInputHandler::ThrottledInputEventAck", | 554 "RenderWidgetInputHandler::ThrottledInputEventAck", |
| 555 pending_input_event_ack_.get()); | 555 pending_input_event_ack_.get()); |
| 556 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); | 556 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); |
| 557 } | 557 } |
| 558 total_input_handling_time_this_frame_ = base::TimeDelta(); | 558 total_input_handling_time_this_frame_ = base::TimeDelta(); |
| 559 } | 559 } |
| 560 | 560 |
| 561 } // namespace content | 561 } // namespace content |
| OLD | NEW |