| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 void RenderWidget::OnRequestMoveAck() { | 960 void RenderWidget::OnRequestMoveAck() { |
| 961 DCHECK(pending_window_rect_count_); | 961 DCHECK(pending_window_rect_count_); |
| 962 pending_window_rect_count_--; | 962 pending_window_rect_count_--; |
| 963 } | 963 } |
| 964 | 964 |
| 965 GURL RenderWidget::GetURLForGraphicsContext3D() { | 965 GURL RenderWidget::GetURLForGraphicsContext3D() { |
| 966 return GURL(); | 966 return GURL(); |
| 967 } | 967 } |
| 968 | 968 |
| 969 void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event, | 969 void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event, |
| 970 const ui::LatencyInfo& latency_info) { | 970 const ui::LatencyInfo& latency_info, |
| 971 InputEventDispatchType dispatch_type) { |
| 971 if (!input_event) | 972 if (!input_event) |
| 972 return; | 973 return; |
| 973 input_handler_->HandleInputEvent(*input_event, latency_info); | 974 input_handler_->HandleInputEvent(*input_event, latency_info, dispatch_type); |
| 974 } | 975 } |
| 975 | 976 |
| 976 void RenderWidget::OnCursorVisibilityChange(bool is_visible) { | 977 void RenderWidget::OnCursorVisibilityChange(bool is_visible) { |
| 977 if (webwidget_) | 978 if (webwidget_) |
| 978 webwidget_->setCursorVisibilityState(is_visible); | 979 webwidget_->setCursorVisibilityState(is_visible); |
| 979 } | 980 } |
| 980 | 981 |
| 981 void RenderWidget::OnMouseCaptureLost() { | 982 void RenderWidget::OnMouseCaptureLost() { |
| 982 if (webwidget_) | 983 if (webwidget_) |
| 983 webwidget_->mouseCaptureLost(); | 984 webwidget_->mouseCaptureLost(); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 void RenderWidget::OnDidHandleKeyEvent() {} | 1264 void RenderWidget::OnDidHandleKeyEvent() {} |
| 1264 | 1265 |
| 1265 void RenderWidget::OnDidOverscroll(const DidOverscrollParams& params) { | 1266 void RenderWidget::OnDidOverscroll(const DidOverscrollParams& params) { |
| 1266 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); | 1267 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); |
| 1267 } | 1268 } |
| 1268 | 1269 |
| 1269 void RenderWidget::OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) { | 1270 void RenderWidget::OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) { |
| 1270 Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, *input_event_ack)); | 1271 Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, *input_event_ack)); |
| 1271 } | 1272 } |
| 1272 | 1273 |
| 1274 void RenderWidget::NonBlockingInputEventHandled( |
| 1275 blink::WebInputEvent::Type handled_type) { |
| 1276 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 1277 InputHandlerManager* input_handler_manager = |
| 1278 render_thread ? render_thread->input_handler_manager() : NULL; |
| 1279 if (input_handler_manager) { |
| 1280 input_handler_manager->NonBlockingInputEventHandledOnMainThread( |
| 1281 routing_id_, handled_type); |
| 1282 } |
| 1283 } |
| 1284 |
| 1273 void RenderWidget::SetInputHandler(RenderWidgetInputHandler* input_handler) { | 1285 void RenderWidget::SetInputHandler(RenderWidgetInputHandler* input_handler) { |
| 1274 // Nothing to do here. RenderWidget created the |input_handler| and will take | 1286 // Nothing to do here. RenderWidget created the |input_handler| and will take |
| 1275 // ownership of it. We just verify here that we don't already have an input | 1287 // ownership of it. We just verify here that we don't already have an input |
| 1276 // handler. | 1288 // handler. |
| 1277 DCHECK(!input_handler_); | 1289 DCHECK(!input_handler_); |
| 1278 } | 1290 } |
| 1279 | 1291 |
| 1280 void RenderWidget::UpdateTextInputState(ShowIme show_ime, | 1292 void RenderWidget::UpdateTextInputState(ShowIme show_ime, |
| 1281 ChangeSource change_source) { | 1293 ChangeSource change_source) { |
| 1282 TRACE_EVENT0("renderer", "RenderWidget::UpdateTextInputState"); | 1294 TRACE_EVENT0("renderer", "RenderWidget::UpdateTextInputState"); |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 video_hole_frames_.RemoveObserver(frame); | 2303 video_hole_frames_.RemoveObserver(frame); |
| 2292 } | 2304 } |
| 2293 #endif // defined(VIDEO_HOLE) | 2305 #endif // defined(VIDEO_HOLE) |
| 2294 | 2306 |
| 2295 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { | 2307 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { |
| 2296 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), | 2308 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), |
| 2297 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | 2309 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
| 2298 } | 2310 } |
| 2299 | 2311 |
| 2300 } // namespace content | 2312 } // namespace content |
| OLD | NEW |