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/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "content/browser/renderer_host/input/input_router_impl.h" | 38 #include "content/browser/renderer_host/input/input_router_impl.h" |
39 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 39 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
40 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" | 40 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" |
41 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 41 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
42 #include "content/browser/renderer_host/input/timeout_monitor.h" | 42 #include "content/browser/renderer_host/input/timeout_monitor.h" |
43 #include "content/browser/renderer_host/input/touch_emulator.h" | 43 #include "content/browser/renderer_host/input/touch_emulator.h" |
44 #include "content/browser/renderer_host/render_process_host_impl.h" | 44 #include "content/browser/renderer_host/render_process_host_impl.h" |
45 #include "content/browser/renderer_host/render_view_host_impl.h" | 45 #include "content/browser/renderer_host/render_view_host_impl.h" |
46 #include "content/browser/renderer_host/render_widget_helper.h" | 46 #include "content/browser/renderer_host/render_widget_helper.h" |
47 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 47 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 48 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
48 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" | 49 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" |
49 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 50 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
50 #include "content/common/content_constants_internal.h" | 51 #include "content/common/content_constants_internal.h" |
51 #include "content/common/content_switches_internal.h" | 52 #include "content/common/content_switches_internal.h" |
52 #include "content/common/cursors/webcursor.h" | 53 #include "content/common/cursors/webcursor.h" |
53 #include "content/common/frame_messages.h" | 54 #include "content/common/frame_messages.h" |
54 #include "content/common/gpu/gpu_messages.h" | 55 #include "content/common/gpu/gpu_messages.h" |
55 #include "content/common/host_shared_bitmap_manager.h" | 56 #include "content/common/host_shared_bitmap_manager.h" |
56 #include "content/common/input_messages.h" | 57 #include "content/common/input_messages.h" |
57 #include "content/common/resize_params.h" | 58 #include "content/common/resize_params.h" |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 return is_loading_; | 438 return is_loading_; |
438 } | 439 } |
439 | 440 |
440 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { | 441 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { |
441 if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg)) | 442 if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg)) |
442 return true; | 443 return true; |
443 | 444 |
444 bool handled = true; | 445 bool handled = true; |
445 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg) | 446 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg) |
446 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone) | 447 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone) |
| 448 IPC_MESSAGE_HANDLER(FrameHostMsg_HittestData, OnHittestData) |
447 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, | 449 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, |
448 OnQueueSyntheticGesture) | 450 OnQueueSyntheticGesture) |
449 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, | 451 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, |
450 OnImeCancelComposition) | 452 OnImeCancelComposition) |
451 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 453 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
452 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, | 454 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, |
453 OnUpdateScreenRectsAck) | 455 OnUpdateScreenRectsAck) |
454 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 456 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
455 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) | 457 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
456 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, | 458 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 if (!owned_by_render_frame_host_) { | 1503 if (!owned_by_render_frame_host_) { |
1502 // TODO(evanm): This synchronously ends up calling "delete this". | 1504 // TODO(evanm): This synchronously ends up calling "delete this". |
1503 // Is that really what we want in response to this message? I'm matching | 1505 // Is that really what we want in response to this message? I'm matching |
1504 // previous behavior of the code here. | 1506 // previous behavior of the code here. |
1505 Destroy(true); | 1507 Destroy(true); |
1506 } else { | 1508 } else { |
1507 RendererExited(static_cast<base::TerminationStatus>(status), exit_code); | 1509 RendererExited(static_cast<base::TerminationStatus>(status), exit_code); |
1508 } | 1510 } |
1509 } | 1511 } |
1510 | 1512 |
| 1513 void RenderWidgetHostImpl::OnHittestData( |
| 1514 const FrameHostMsg_HittestData_Params& params) { |
| 1515 if (delegate_) |
| 1516 delegate_->GetInputEventRouter()->OnHittestData(params); |
| 1517 } |
| 1518 |
1511 void RenderWidgetHostImpl::OnClose() { | 1519 void RenderWidgetHostImpl::OnClose() { |
1512 ShutdownAndDestroyWidget(true); | 1520 ShutdownAndDestroyWidget(true); |
1513 } | 1521 } |
1514 | 1522 |
1515 void RenderWidgetHostImpl::OnSetTooltipText( | 1523 void RenderWidgetHostImpl::OnSetTooltipText( |
1516 const base::string16& tooltip_text, | 1524 const base::string16& tooltip_text, |
1517 WebTextDirection text_direction_hint) { | 1525 WebTextDirection text_direction_hint) { |
1518 // First, add directionality marks around tooltip text if necessary. | 1526 // First, add directionality marks around tooltip text if necessary. |
1519 // A naive solution would be to simply always wrap the text. However, on | 1527 // A naive solution would be to simply always wrap the text. However, on |
1520 // windows, Unicode directional embedding characters can't be displayed on | 1528 // windows, Unicode directional embedding characters can't be displayed on |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 } | 2253 } |
2246 | 2254 |
2247 #if defined(OS_WIN) | 2255 #if defined(OS_WIN) |
2248 gfx::NativeViewAccessible | 2256 gfx::NativeViewAccessible |
2249 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2257 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
2250 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2258 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
2251 } | 2259 } |
2252 #endif | 2260 #endif |
2253 | 2261 |
2254 } // namespace content | 2262 } // namespace content |
OLD | NEW |