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_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 OnDidChangeNumWheelEvents) | 993 OnDidChangeNumWheelEvents) |
994 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, | 994 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, |
995 OnRouteCloseEvent) | 995 OnRouteCloseEvent) |
996 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) | 996 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) |
997 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) | 997 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) |
998 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 998 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
999 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) | 999 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) |
1000 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 1000 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
1001 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 1001 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
1002 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) | 1002 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) |
1003 #if defined(OS_ANDROID) | |
1004 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged, | |
1005 OnSelectionRootBoundsChanged) | |
1006 #endif | |
1007 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 1003 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
1008 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1004 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
1009 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) | 1005 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) |
1010 IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup) | 1006 IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup) |
1011 #endif | 1007 #endif |
1012 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) | 1008 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) |
1013 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 1009 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
1014 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 1010 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
1015 OnAccessibilityLocationChanges) | 1011 OnAccessibilityLocationChanges) |
1016 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) | 1012 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 | 1205 |
1210 void RenderViewHostImpl::OnDidChangeScrollOffsetPinningForMainFrame( | 1206 void RenderViewHostImpl::OnDidChangeScrollOffsetPinningForMainFrame( |
1211 bool is_pinned_to_left, bool is_pinned_to_right) { | 1207 bool is_pinned_to_left, bool is_pinned_to_right) { |
1212 if (view_) | 1208 if (view_) |
1213 view_->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right); | 1209 view_->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right); |
1214 } | 1210 } |
1215 | 1211 |
1216 void RenderViewHostImpl::OnDidChangeNumWheelEvents(int count) { | 1212 void RenderViewHostImpl::OnDidChangeNumWheelEvents(int count) { |
1217 } | 1213 } |
1218 | 1214 |
1219 #if defined(OS_ANDROID) | |
1220 void RenderViewHostImpl::OnSelectionRootBoundsChanged( | |
1221 const gfx::Rect& bounds) { | |
1222 if (view_) { | |
1223 view_->SelectionRootBoundsChanged(bounds); | |
1224 } | |
1225 } | |
1226 #endif | |
1227 | |
1228 void RenderViewHostImpl::OnRouteCloseEvent() { | 1215 void RenderViewHostImpl::OnRouteCloseEvent() { |
1229 // Have the delegate route this to the active RenderViewHost. | 1216 // Have the delegate route this to the active RenderViewHost. |
1230 delegate_->RouteCloseEvent(this); | 1217 delegate_->RouteCloseEvent(this); |
1231 } | 1218 } |
1232 | 1219 |
1233 void RenderViewHostImpl::OnRouteMessageEvent( | 1220 void RenderViewHostImpl::OnRouteMessageEvent( |
1234 const ViewMsg_PostMessage_Params& params) { | 1221 const ViewMsg_PostMessage_Params& params) { |
1235 // Give to the delegate to route to the active RenderViewHost. | 1222 // Give to the delegate to route to the active RenderViewHost. |
1236 delegate_->RouteMessageEvent(this, params); | 1223 delegate_->RouteMessageEvent(this, params); |
1237 } | 1224 } |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1667 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1681 | 1668 |
1682 frame_tree->ResetForMainFrameSwap(); | 1669 frame_tree->ResetForMainFrameSwap(); |
1683 } | 1670 } |
1684 | 1671 |
1685 void RenderViewHostImpl::SelectWordAroundCaret() { | 1672 void RenderViewHostImpl::SelectWordAroundCaret() { |
1686 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1673 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1687 } | 1674 } |
1688 | 1675 |
1689 } // namespace content | 1676 } // namespace content |
OLD | NEW |