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 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1375 WasResized(); | 1375 WasResized(); |
1376 delegate_->RenderViewReady(this); | 1376 delegate_->RenderViewReady(this); |
1377 } | 1377 } |
1378 | 1378 |
1379 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { | 1379 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { |
1380 // Keep the termination status so we can get at it later when we | 1380 // Keep the termination status so we can get at it later when we |
1381 // need to know why it died. | 1381 // need to know why it died. |
1382 render_view_termination_status_ = | 1382 render_view_termination_status_ = |
1383 static_cast<base::TerminationStatus>(status); | 1383 static_cast<base::TerminationStatus>(status); |
1384 | 1384 |
1385 // Reset state. | 1385 // Reset frame tree state. |
1386 main_frame_id_ = -1; | 1386 main_frame_id_ = -1; |
1387 delegate_->GetFrameTree()->SwapMainFrame(main_render_frame_host_.get()); | |
nasko
2013/11/23 01:05:21
This seems to do the right thing now, but I wonder
Charlie Reis
2013/11/23 01:20:13
Good point. SwapMainFrame is definitely going to
| |
1387 | 1388 |
1388 // Our base class RenderWidgetHost needs to reset some stuff. | 1389 // Our base class RenderWidgetHost needs to reset some stuff. |
1389 RendererExited(render_view_termination_status_, exit_code); | 1390 RendererExited(render_view_termination_status_, exit_code); |
1390 | 1391 |
1391 delegate_->RenderViewTerminated(this, | 1392 delegate_->RenderViewTerminated(this, |
1392 static_cast<base::TerminationStatus>(status), | 1393 static_cast<base::TerminationStatus>(status), |
1393 exit_code); | 1394 exit_code); |
1394 } | 1395 } |
1395 | 1396 |
1396 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( | 1397 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2278 void RenderViewHostImpl::AttachToFrameTree() { | 2279 void RenderViewHostImpl::AttachToFrameTree() { |
2279 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2280 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2280 | 2281 |
2281 frame_tree->SwapMainFrame(main_render_frame_host_.get()); | 2282 frame_tree->SwapMainFrame(main_render_frame_host_.get()); |
2282 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2283 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2283 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2284 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2284 } | 2285 } |
2285 } | 2286 } |
2286 | 2287 |
2287 } // namespace content | 2288 } // namespace content |
OLD | NEW |