Index: content/browser/frame_host/render_frame_host_manager.h |
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h |
index 39b6b9f1ff1d899420a88dd39970879c4da2f85c..694fbf83638bcd4c42bf8c2d5a386de1306ba69a 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.h |
+++ b/content/browser/frame_host/render_frame_host_manager.h |
@@ -12,6 +12,7 @@ |
#include "content/browser/renderer_host/render_view_host_delegate.h" |
#include "content/browser/site_instance_impl.h" |
#include "content/common/content_export.h" |
+#include "content/public/browser/global_request_id.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/common/referrer.h" |
@@ -270,6 +271,15 @@ class CONTENT_EXPORT RenderFrameHostManager |
// to a new process after this completes or times out. |
void SwapOutOldPage(); |
+ // Deletes a RenderFrameHost that was pending shutdown. |
+ void ClearPendingShutdownRFHForSiteInstance(int32 site_instance_id, |
+ RenderFrameHostImpl* rfh); |
+ |
+ // Deletes all RenderFrameHosts pending shutdown. This will cause the |
+ // associated RenderViewHosts to shutdown as well. Used during the destruction |
+ // of WebContentsImpl. |
+ void ClearAllPendingShutdownRFH(); |
+ |
private: |
friend class RenderFrameHostManagerTest; |
friend class TestWebContents; |
@@ -440,6 +450,11 @@ class CONTENT_EXPORT RenderFrameHostManager |
typedef base::hash_map<int32, RenderFrameHostImpl*> RenderFrameHostMap; |
RenderFrameHostMap swapped_out_hosts_; |
+ // A map of RenderFrameHosts pending shutdown. |
+ typedef base::hash_map<int32, linked_ptr<RenderFrameHostImpl> > |
+ RFHPendingDeleteMap; |
+ RFHPendingDeleteMap pending_delete_hosts_; |
+ |
// The intersitial page currently shown if any, not own by this class |
// (the InterstitialPage is self-owned, it deletes itself when hidden). |
InterstitialPageImpl* interstitial_page_; |
@@ -453,6 +468,8 @@ class CONTENT_EXPORT RenderFrameHostManager |
// process as its parent. |
CrossProcessFrameConnector* cross_process_frame_connector_; |
+ base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
}; |