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