| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 IPC_BEGIN_MESSAGE_MAP(RenderViewHostImpl, msg) | 906 IPC_BEGIN_MESSAGE_MAP(RenderViewHostImpl, msg) |
| 907 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnShowView) | 907 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnShowView) |
| 908 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget) | 908 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget) |
| 909 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget, | 909 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget, |
| 910 OnShowFullscreenWidget) | 910 OnShowFullscreenWidget) |
| 911 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal) | 911 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal) |
| 912 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) | 912 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) |
| 913 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) | 913 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) |
| 914 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) | 914 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) |
| 915 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) | 915 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) |
| 916 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, | |
| 917 OnUpdateInspectorSetting) | |
| 918 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 916 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
| 919 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 917 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 920 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, | 918 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, |
| 921 OnDocumentAvailableInMainFrame) | 919 OnDocumentAvailableInMainFrame) |
| 922 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen) | 920 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, OnToggleFullscreen) |
| 923 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 921 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
| 924 OnDidContentsPreferredSizeChange) | 922 OnDidContentsPreferredSizeChange) |
| 925 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, | 923 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, |
| 926 OnRouteCloseEvent) | 924 OnRouteCloseEvent) |
| 927 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) | 925 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 | 1087 |
| 1090 void RenderViewHostImpl::OnUpdateTargetURL(int32 page_id, const GURL& url) { | 1088 void RenderViewHostImpl::OnUpdateTargetURL(int32 page_id, const GURL& url) { |
| 1091 if (IsRVHStateActive(rvh_state_)) | 1089 if (IsRVHStateActive(rvh_state_)) |
| 1092 delegate_->UpdateTargetURL(page_id, url); | 1090 delegate_->UpdateTargetURL(page_id, url); |
| 1093 | 1091 |
| 1094 // Send a notification back to the renderer that we are ready to | 1092 // Send a notification back to the renderer that we are ready to |
| 1095 // receive more target urls. | 1093 // receive more target urls. |
| 1096 Send(new ViewMsg_UpdateTargetURL_ACK(GetRoutingID())); | 1094 Send(new ViewMsg_UpdateTargetURL_ACK(GetRoutingID())); |
| 1097 } | 1095 } |
| 1098 | 1096 |
| 1099 void RenderViewHostImpl::OnUpdateInspectorSetting( | |
| 1100 const std::string& key, const std::string& value) { | |
| 1101 GetContentClient()->browser()->UpdateInspectorSetting( | |
| 1102 this, key, value); | |
| 1103 } | |
| 1104 | |
| 1105 void RenderViewHostImpl::OnClose() { | 1097 void RenderViewHostImpl::OnClose() { |
| 1106 // If the renderer is telling us to close, it has already run the unload | 1098 // If the renderer is telling us to close, it has already run the unload |
| 1107 // events, and we can take the fast path. | 1099 // events, and we can take the fast path. |
| 1108 ClosePageIgnoringUnloadEvents(); | 1100 ClosePageIgnoringUnloadEvents(); |
| 1109 } | 1101 } |
| 1110 | 1102 |
| 1111 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1103 void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) { |
| 1112 if (IsRVHStateActive(rvh_state_)) | 1104 if (IsRVHStateActive(rvh_state_)) |
| 1113 delegate_->RequestMove(pos); | 1105 delegate_->RequestMove(pos); |
| 1114 Send(new ViewMsg_Move_ACK(GetRoutingID())); | 1106 Send(new ViewMsg_Move_ACK(GetRoutingID())); |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1550 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1559 | 1551 |
| 1560 frame_tree->ResetForMainFrameSwap(); | 1552 frame_tree->ResetForMainFrameSwap(); |
| 1561 } | 1553 } |
| 1562 | 1554 |
| 1563 void RenderViewHostImpl::SelectWordAroundCaret() { | 1555 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1564 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1556 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1565 } | 1557 } |
| 1566 | 1558 |
| 1567 } // namespace content | 1559 } // namespace content |
| OLD | NEW |