Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 18339006: Rename RenderViewGone IPC/methods to better reflect reality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for reviews by creis@ and palmer@. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/web_contents/render_view_host_manager.h" 5 #include "content/browser/web_contents/render_view_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 // Swap in the pending view and make it active. 728 // Swap in the pending view and make it active.
729 RenderViewHostImpl* old_render_view_host = render_view_host_; 729 RenderViewHostImpl* old_render_view_host = render_view_host_;
730 render_view_host_ = pending_render_view_host_; 730 render_view_host_ = pending_render_view_host_;
731 pending_render_view_host_ = NULL; 731 pending_render_view_host_ = NULL;
732 732
733 // The process will no longer try to exit, so we can decrement the count. 733 // The process will no longer try to exit, so we can decrement the count.
734 render_view_host_->GetProcess()->RemovePendingView(); 734 render_view_host_->GetProcess()->RemovePendingView();
735 735
736 // If the view is gone, then this RenderViewHost died while it was hidden. 736 // If the view is gone, then this RenderViewHost died while it was hidden.
737 // We ignored the RenderViewGone call at the time, so we should send it now 737 // We ignored the RenderProcessGone call at the time, so we should send it now
738 // to make sure the sad tab shows up, etc. 738 // to make sure the sad tab shows up, etc.
739 if (render_view_host_->GetView()) 739 if (render_view_host_->GetView())
740 render_view_host_->GetView()->Show(); 740 render_view_host_->GetView()->Show();
741 else 741 else
742 delegate_->RenderViewGoneFromRenderManager(render_view_host_); 742 delegate_->RenderProcessGoneFromRenderManager(render_view_host_);
743 743
744 // Hide the old view now that the new one is visible. 744 // Hide the old view now that the new one is visible.
745 if (old_render_view_host->GetView()) { 745 if (old_render_view_host->GetView()) {
746 old_render_view_host->GetView()->Hide(); 746 old_render_view_host->GetView()->Hide();
747 old_render_view_host->WasSwappedOut(); 747 old_render_view_host->WasSwappedOut();
748 } 748 }
749 749
750 // Make sure the size is up to date. (Fix for bug 1079768.) 750 // Make sure the size is up to date. (Fix for bug 1079768.)
751 delegate_->UpdateRenderViewSizeForRenderManager(); 751 delegate_->UpdateRenderViewSizeForRenderManager();
752 752
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 1002 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
1003 SiteInstance* instance) { 1003 SiteInstance* instance) {
1004 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 1004 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
1005 if (iter != swapped_out_hosts_.end()) 1005 if (iter != swapped_out_hosts_.end())
1006 return iter->second; 1006 return iter->second;
1007 1007
1008 return NULL; 1008 return NULL;
1009 } 1009 }
1010 1010
1011 } // namespace content 1011 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698