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