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

Unified Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + addressed some of Nasko's comments Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
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 a28cb081e38c0c7fa071facc4251ae8e47e79b20..5e23c581e9880038071f2b8e5f124ac3e53553ea 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"
@@ -269,6 +270,10 @@ 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);
+
private:
friend class RenderFrameHostManagerTest;
friend class TestWebContents;
@@ -437,6 +442,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_;
@@ -450,6 +460,8 @@ class CONTENT_EXPORT RenderFrameHostManager
// process as its parent.
CrossProcessFrameConnector* cross_process_frame_connector_;
+ base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
};

Powered by Google App Engine
This is Rietveld 408576698