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

Unified Diff: content/public/browser/content_browser_client.h

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Addressing CR feedback from jkarlin@ and creis@. Created 3 years, 5 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/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 760e15d1929e8decc4738365a020fa1703e731e0..e226ba13095a50a5dc828616c53d62cb2e290bfd 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <set>
#include <string>
#include <utility>
#include <vector>
@@ -261,13 +262,16 @@ class CONTENT_EXPORT ContentBrowserClient {
bool* is_renderer_initiated,
content::Referrer* referrer) {}
- // Allows the embedder to override top document isolation for specific frames.
- // |url| is the URL being loaded in the subframe, and |parent_site_instance|
- // is the SiteInstance of the parent frame. Called only for subframes and only
- // when top document isolation mode is enabled.
- virtual bool ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
- const GURL& url,
- SiteInstance* parent_site_instance);
+ // Called in TopDocumentIsolation mode to let the embedder decide whether the
+ // subframe navigation tracked by |navigation_handle| should end up isolated
+ // from the main content.
+ //
+ // The subframe navigation in question is always to a URL that is cross-site
+ // from the top-level frame. |main_frame_site_instance| is the SiteInstance
+ // of the top-level frame.
+ virtual bool ShouldIsolateFrameForTopDocumentIsolation(
+ NavigationHandle* navigation_handle,
+ SiteInstance* main_frame_site_instance);
// Returns whether a new view for a given |site_url| can be launched in a
// given |process_host|.
« no previous file with comments | « content/browser/top_document_isolation_browsertest.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698