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/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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
741 RenderViewHostImpl* old_render_view_host = render_view_host_; | 741 RenderViewHostImpl* old_render_view_host = render_view_host_; |
742 render_view_host_ = pending_render_view_host_; | 742 render_view_host_ = pending_render_view_host_; |
743 pending_render_view_host_ = NULL; | 743 pending_render_view_host_ = NULL; |
744 | 744 |
745 // The process will no longer try to exit, so we can decrement the count. | 745 // The process will no longer try to exit, so we can decrement the count. |
746 render_view_host_->GetProcess()->RemovePendingView(); | 746 render_view_host_->GetProcess()->RemovePendingView(); |
747 | 747 |
748 // If the view is gone, then this RenderViewHost died while it was hidden. | 748 // If the view is gone, then this RenderViewHost died while it was hidden. |
749 // We ignored the RenderProcessGone call at the time, so we should send it now | 749 // We ignored the RenderProcessGone call at the time, so we should send it now |
750 // to make sure the sad tab shows up, etc. | 750 // to make sure the sad tab shows up, etc. |
751 if (render_view_host_->GetView()) | 751 if (render_view_host_->GetView()) { |
752 render_view_host_->WasShown(); | |
752 render_view_host_->GetView()->Show(); | 753 render_view_host_->GetView()->Show(); |
Fady Samuel
2013/09/17 20:14:43
Drive-by thought: It seems that on most platforms
| |
754 } | |
753 else | 755 else |
754 delegate_->RenderProcessGoneFromRenderManager(render_view_host_); | 756 delegate_->RenderProcessGoneFromRenderManager(render_view_host_); |
755 | 757 |
756 // Hide the old view now that the new one is visible. | 758 // Hide the old view now that the new one is visible. |
757 if (old_render_view_host->GetView()) { | 759 if (old_render_view_host->GetView()) { |
758 old_render_view_host->GetView()->Hide(); | 760 old_render_view_host->GetView()->Hide(); |
759 old_render_view_host->WasSwappedOut(); | 761 old_render_view_host->WasSwappedOut(); |
760 } | 762 } |
761 | 763 |
762 // Make sure the size is up to date. (Fix for bug 1079768.) | 764 // Make sure the size is up to date. (Fix for bug 1079768.) |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1045 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( | 1047 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( |
1046 SiteInstance* instance) { | 1048 SiteInstance* instance) { |
1047 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); | 1049 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); |
1048 if (iter != swapped_out_hosts_.end()) | 1050 if (iter != swapped_out_hosts_.end()) |
1049 return iter->second; | 1051 return iter->second; |
1050 | 1052 |
1051 return NULL; | 1053 return NULL; |
1052 } | 1054 } |
1053 | 1055 |
1054 } // namespace content | 1056 } // namespace content |
OLD | NEW |