| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 | 1216 |
| 1217 // Note that we can't use handling_event_type_ here since it will be overriden | 1217 // Note that we can't use handling_event_type_ here since it will be overriden |
| 1218 // by reentrant calls for events after the paused one. | 1218 // by reentrant calls for events after the paused one. |
| 1219 bool no_ack = ignore_ack_for_mouse_move_from_debugger_ && | 1219 bool no_ack = ignore_ack_for_mouse_move_from_debugger_ && |
| 1220 input_event->type == WebInputEvent::MouseMove; | 1220 input_event->type == WebInputEvent::MouseMove; |
| 1221 if (!WebInputEventTraits::IgnoresAckDisposition(*input_event) && !no_ack) { | 1221 if (!WebInputEventTraits::IgnoresAckDisposition(*input_event) && !no_ack) { |
| 1222 InputHostMsg_HandleInputEvent_ACK_Params ack; | 1222 InputHostMsg_HandleInputEvent_ACK_Params ack; |
| 1223 ack.type = input_event->type; | 1223 ack.type = input_event->type; |
| 1224 ack.state = ack_result; | 1224 ack.state = ack_result; |
| 1225 ack.latency = swap_latency_info; | 1225 ack.latency = swap_latency_info; |
| 1226 if (WebInputEvent::isTouchEventType(ack.type)) { |
| 1227 const blink::WebTouchEvent& touch = |
| 1228 static_cast<const blink::WebTouchEvent&>(*input_event); |
| 1229 ack.unique_touch_event_id = touch.uniqueTouchEventId; |
| 1230 } |
| 1226 scoped_ptr<IPC::Message> response( | 1231 scoped_ptr<IPC::Message> response( |
| 1227 new InputHostMsg_HandleInputEvent_ACK(routing_id_, ack)); | 1232 new InputHostMsg_HandleInputEvent_ACK(routing_id_, ack)); |
| 1228 if (rate_limiting_wanted && frame_pending && !is_hidden_) { | 1233 if (rate_limiting_wanted && frame_pending && !is_hidden_) { |
| 1229 // We want to rate limit the input events in this case, so we'll wait for | 1234 // We want to rate limit the input events in this case, so we'll wait for |
| 1230 // painting to finish before ACKing this message. | 1235 // painting to finish before ACKing this message. |
| 1231 TRACE_EVENT_INSTANT0("renderer", | 1236 TRACE_EVENT_INSTANT0("renderer", |
| 1232 "RenderWidget::OnHandleInputEvent ack throttled", | 1237 "RenderWidget::OnHandleInputEvent ack throttled", |
| 1233 TRACE_EVENT_SCOPE_THREAD); | 1238 TRACE_EVENT_SCOPE_THREAD); |
| 1234 if (pending_input_event_ack_) { | 1239 if (pending_input_event_ack_) { |
| 1235 TRACE_EVENT_ASYNC_END0("input", "RenderWidget::ThrottledInputEventAck", | 1240 TRACE_EVENT_ASYNC_END0("input", "RenderWidget::ThrottledInputEventAck", |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2417 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2422 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2418 video_hole_frames_.AddObserver(frame); | 2423 video_hole_frames_.AddObserver(frame); |
| 2419 } | 2424 } |
| 2420 | 2425 |
| 2421 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2426 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2422 video_hole_frames_.RemoveObserver(frame); | 2427 video_hole_frames_.RemoveObserver(frame); |
| 2423 } | 2428 } |
| 2424 #endif // defined(VIDEO_HOLE) | 2429 #endif // defined(VIDEO_HOLE) |
| 2425 | 2430 |
| 2426 } // namespace content | 2431 } // namespace content |
| OLD | NEW |