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

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

Issue 1797363002: "Top Document Isolation" mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing override Created 4 years, 9 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 2f288c94f1808f51cf03c6500696133ba0d567ee..3ae343f541ec0f36117152de8f59ef8fa3b70aa7 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -505,6 +505,15 @@ class CONTENT_EXPORT RenderFrameHostManager
friend class RenderFrameHostManagerTest;
friend class TestWebContents;
+ enum class SiteInstanceRelation {
+ // A SiteInstance in a different browsing instance from the current.
+ UNRELATED,
+ // A SiteInstance in the same browsing instance as the current.
+ RELATED,
+ // The default subframe SiteInstance for the current browsing instance.
+ RELATED_DEFAULT_SUBFRAME,
+ };
+
// Stores information regarding a SiteInstance targeted at a specific URL to
// allow for comparisons without having to actually create new instances. It
// can point to an existing one or store the details needed to create a new
@@ -512,11 +521,11 @@ class CONTENT_EXPORT RenderFrameHostManager
struct CONTENT_EXPORT SiteInstanceDescriptor {
explicit SiteInstanceDescriptor(content::SiteInstance* site_instance)
: existing_site_instance(site_instance),
- new_is_related_to_current(false) {}
+ relation(SiteInstanceRelation::UNRELATED) {}
SiteInstanceDescriptor(BrowserContext* browser_context,
GURL dest_url,
- bool related_to_current);
+ SiteInstanceRelation relation_to_current);
// Set with an existing SiteInstance to be reused.
content::SiteInstance* existing_site_instance;
@@ -526,7 +535,7 @@ class CONTENT_EXPORT RenderFrameHostManager
// In case |existing_site_instance| is null, specify if the new site should
Charlie Reis 2016/03/25 19:47:12 nit: specify how the new site is related to the cu
ncarter (slow) 2016/03/28 22:00:28 Done.
// be created in a new BrowsingInstance or not.
- bool new_is_related_to_current;
+ SiteInstanceRelation relation;
};
// Create a RenderFrameProxyHost owned by this object.
@@ -599,9 +608,9 @@ class CONTENT_EXPORT RenderFrameHostManager
SiteInstance* ConvertToSiteInstance(const SiteInstanceDescriptor& descriptor,
SiteInstance* candidate_instance);
- // Determines the appropriate url to use as the current url for SiteInstance
- // selection.
- const GURL& GetCurrentURLForSiteInstance(SiteInstance* current_instance);
+ // Returns true if |candidate| is currently on the same web site as dest_url.
+ bool IsCurrentlySameSite(RenderFrameHostImpl* candidate,
+ const GURL& dest_url);
// Creates a new RenderFrameHostImpl for the |new_instance| and assign it to
// |pending_render_frame_host_| while respecting the opener route if needed

Powered by Google App Engine
This is Rietveld 408576698