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

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

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/render_view_host_manager.h" 5 #include "content/browser/tab_contents/render_view_host_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/debugger/devtools_manager.h" 9 #include "content/browser/debugger/devtools_manager.h"
10 #include "content/browser/renderer_host/render_view_host.h" 10 #include "content/browser/renderer_host/render_view_host.h"
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 pending_render_view_host->process()->RemovePendingView(); 763 pending_render_view_host->process()->RemovePendingView();
764 764
765 // The pending RVH may already be on the swapped out list if we started to 765 // The pending RVH may already be on the swapped out list if we started to
766 // swap it back in and then canceled. If so, make sure it gets swapped out 766 // swap it back in and then canceled. If so, make sure it gets swapped out
767 // again. If it's not on the swapped out list (e.g., aborting a pending 767 // again. If it's not on the swapped out list (e.g., aborting a pending
768 // load), then it's safe to shut down. 768 // load), then it's safe to shut down.
769 if (IsSwappedOut(pending_render_view_host)) { 769 if (IsSwappedOut(pending_render_view_host)) {
770 // Any currently suspended navigations are no longer needed. 770 // Any currently suspended navigations are no longer needed.
771 pending_render_view_host->CancelSuspendedNavigations(); 771 pending_render_view_host->CancelSuspendedNavigations();
772 772
773 // We can pass -1,-1 because there is no pending response in the 773 // We can pass -1,-1,-1 because there is no pending response in the
Charlie Reis 2011/12/01 23:13:02 Leftover from a previous change?
supersat 2011/12/09 23:08:20 Yes.
774 // ResourceDispatcherHost to unpause. 774 // ResourceDispatcherHost to unpause.
775 pending_render_view_host->SwapOut(-1, -1); 775 pending_render_view_host->SwapOut(-1, -1);
776 } else { 776 } else {
777 // We won't be coming back, so shut this one down. 777 // We won't be coming back, so shut this one down.
778 pending_render_view_host->Shutdown(); 778 pending_render_view_host->Shutdown();
779 } 779 }
780 780
781 pending_web_ui_.reset(); 781 pending_web_ui_.reset();
782 } 782 }
783 783
(...skipping 25 matching lines...) Expand all
809 } 809 }
810 } 810 }
811 811
812 bool RenderViewHostManager::IsSwappedOut(RenderViewHost* rvh) { 812 bool RenderViewHostManager::IsSwappedOut(RenderViewHost* rvh) {
813 if (!rvh->site_instance()) 813 if (!rvh->site_instance())
814 return false; 814 return false;
815 815
816 return swapped_out_hosts_.find(rvh->site_instance()->id()) != 816 return swapped_out_hosts_.find(rvh->site_instance()->id()) !=
817 swapped_out_hosts_.end(); 817 swapped_out_hosts_.end();
818 } 818 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698