| 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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHostImpl, msg, msg_is_ok) | 1203 IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHostImpl, msg, msg_is_ok) |
| 1204 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnShowView) | 1204 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnShowView) |
| 1205 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget) | 1205 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget) |
| 1206 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget, | 1206 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget, |
| 1207 OnShowFullscreenWidget) | 1207 OnShowFullscreenWidget) |
| 1208 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal) | 1208 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal) |
| 1209 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) | 1209 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) |
| 1210 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) | 1210 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) |
| 1211 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRedirectProvisionalLoad, | 1211 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRedirectProvisionalLoad, |
| 1212 OnDidRedirectProvisionalLoad) | 1212 OnDidRedirectProvisionalLoad) |
| 1213 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError, | |
| 1214 OnDidFailProvisionalLoadWithError) | |
| 1215 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_FrameNavigate, OnNavigate(msg)) | 1213 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_FrameNavigate, OnNavigate(msg)) |
| 1216 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) | 1214 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) |
| 1217 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnUpdateTitle) | 1215 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnUpdateTitle) |
| 1218 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnUpdateEncoding) | 1216 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnUpdateEncoding) |
| 1219 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) | 1217 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) |
| 1220 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, | 1218 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateInspectorSetting, |
| 1221 OnUpdateInspectorSetting) | 1219 OnUpdateInspectorSetting) |
| 1222 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 1220 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
| 1223 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 1221 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 1224 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnDidStartLoading) | 1222 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnDidStartLoading) |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 } | 1426 } |
| 1429 | 1427 |
| 1430 void RenderViewHostImpl::OnDidRedirectProvisionalLoad( | 1428 void RenderViewHostImpl::OnDidRedirectProvisionalLoad( |
| 1431 int32 page_id, | 1429 int32 page_id, |
| 1432 const GURL& source_url, | 1430 const GURL& source_url, |
| 1433 const GURL& target_url) { | 1431 const GURL& target_url) { |
| 1434 delegate_->DidRedirectProvisionalLoad( | 1432 delegate_->DidRedirectProvisionalLoad( |
| 1435 this, page_id, source_url, target_url); | 1433 this, page_id, source_url, target_url); |
| 1436 } | 1434 } |
| 1437 | 1435 |
| 1438 void RenderViewHostImpl::OnDidFailProvisionalLoadWithError( | |
| 1439 const ViewHostMsg_DidFailProvisionalLoadWithError_Params& params) { | |
| 1440 delegate_->DidFailProvisionalLoadWithError(this, params); | |
| 1441 } | |
| 1442 | |
| 1443 // Called when the renderer navigates. For every frame loaded, we'll get this | 1436 // Called when the renderer navigates. For every frame loaded, we'll get this |
| 1444 // notification containing parameters identifying the navigation. | 1437 // notification containing parameters identifying the navigation. |
| 1445 // | 1438 // |
| 1446 // Subframes are identified by the page transition type. For subframes loaded | 1439 // Subframes are identified by the page transition type. For subframes loaded |
| 1447 // as part of a wider page load, the page_id will be the same as for the top | 1440 // as part of a wider page load, the page_id will be the same as for the top |
| 1448 // level frame. If the user explicitly requests a subframe navigation, we will | 1441 // level frame. If the user explicitly requests a subframe navigation, we will |
| 1449 // get a new page_id because we need to create a new navigation entry for that | 1442 // get a new page_id because we need to create a new navigation entry for that |
| 1450 // action. | 1443 // action. |
| 1451 void RenderViewHostImpl::OnNavigate(const IPC::Message& msg) { | 1444 void RenderViewHostImpl::OnNavigate(const IPC::Message& msg) { |
| 1452 // Read the parameters out of the IPC message directly to avoid making another | 1445 // Read the parameters out of the IPC message directly to avoid making another |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2282 void RenderViewHostImpl::AttachToFrameTree() { | 2275 void RenderViewHostImpl::AttachToFrameTree() { |
| 2283 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2276 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2284 | 2277 |
| 2285 frame_tree->ResetForMainFrameSwap(); | 2278 frame_tree->ResetForMainFrameSwap(); |
| 2286 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2279 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
| 2287 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2280 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
| 2288 } | 2281 } |
| 2289 } | 2282 } |
| 2290 | 2283 |
| 2291 } // namespace content | 2284 } // namespace content |
| OLD | NEW |