| 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 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 WasResized(); | 1381 WasResized(); |
| 1382 delegate_->RenderViewReady(this); | 1382 delegate_->RenderViewReady(this); |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { | 1385 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { |
| 1386 // Keep the termination status so we can get at it later when we | 1386 // Keep the termination status so we can get at it later when we |
| 1387 // need to know why it died. | 1387 // need to know why it died. |
| 1388 render_view_termination_status_ = | 1388 render_view_termination_status_ = |
| 1389 static_cast<base::TerminationStatus>(status); | 1389 static_cast<base::TerminationStatus>(status); |
| 1390 | 1390 |
| 1391 // Reset state. | 1391 // Reset frame tree state. |
| 1392 // TODO(creis): Once subframes can be in different processes, we'll need to |
| 1393 // clear just the FrameTreeNodes affected by the crash (and their subtrees). |
| 1392 main_frame_id_ = -1; | 1394 main_frame_id_ = -1; |
| 1395 delegate_->GetFrameTree()->SwapMainFrame(main_render_frame_host_.get()); |
| 1393 | 1396 |
| 1394 // Our base class RenderWidgetHost needs to reset some stuff. | 1397 // Our base class RenderWidgetHost needs to reset some stuff. |
| 1395 RendererExited(render_view_termination_status_, exit_code); | 1398 RendererExited(render_view_termination_status_, exit_code); |
| 1396 | 1399 |
| 1397 delegate_->RenderViewTerminated(this, | 1400 delegate_->RenderViewTerminated(this, |
| 1398 static_cast<base::TerminationStatus>(status), | 1401 static_cast<base::TerminationStatus>(status), |
| 1399 exit_code); | 1402 exit_code); |
| 1400 } | 1403 } |
| 1401 | 1404 |
| 1402 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( | 1405 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2284 void RenderViewHostImpl::AttachToFrameTree() { | 2287 void RenderViewHostImpl::AttachToFrameTree() { |
| 2285 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2288 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2286 | 2289 |
| 2287 frame_tree->SwapMainFrame(main_render_frame_host_.get()); | 2290 frame_tree->SwapMainFrame(main_render_frame_host_.get()); |
| 2288 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2291 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
| 2289 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2292 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
| 2290 } | 2293 } |
| 2291 } | 2294 } |
| 2292 | 2295 |
| 2293 } // namespace content | 2296 } // namespace content |
| OLD | NEW |