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

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: Suppress tests under --site-per-process 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 b5373ac611567a187dc66d2ea9ed8e7f5cae8eb5..315474885f632fd85efe0ccf6dcb2573d06831c8 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -510,6 +510,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
@@ -517,11 +526,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;
@@ -529,9 +538,9 @@ class CONTENT_EXPORT RenderFrameHostManager
// In case |existing_site_instance| is null, specify a new site URL.
GURL new_site_url;
- // In case |existing_site_instance| is null, specify if the new site should
- // be created in a new BrowsingInstance or not.
- bool new_is_related_to_current;
+ // In case |existing_site_instance| is null, specify how the new site is
+ // related to the current BrowsingInstance.
+ SiteInstanceRelation relation;
};
// Create a RenderFrameProxyHost owned by this object.
@@ -606,9 +615,9 @@ class CONTENT_EXPORT RenderFrameHostManager
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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698