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

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: Use FOR_EACH_TDI_MODE(V) macro. Created 3 years, 6 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 571f9937a8fea459440b36d9bed1576e880e0d55..9bc7d4a1875e8486d3d4624dfd39687367bbcda3 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>
@@ -256,13 +257,13 @@ 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
+ // |frame| should be isolated from the main content (if the frame is navigated
+ // to |url| and the main content is in the |main_frame_site_instance|).
Charlie Reis 2017/06/30 23:28:47 Let's clarify that (1) the dest_url is already ass
Łukasz Anforowicz 2017/07/01 00:10:53 Correct. I've added this information to the comme
Charlie Reis 2017/07/06 20:02:29 Ok. My goal was to convey that a vanilla TDI mode
+ virtual bool ShouldIsolateFrameFromMainContent(
Charlie Reis 2017/06/30 23:28:48 I'm finding it confusing that the name doesn't ref
Łukasz Anforowicz 2017/07/01 00:10:53 Good point. Done. (and thanks for suggesting the
+ RenderFrameHost* frame,
+ const GURL& dest_url,
+ SiteInstance* main_frame_site_instance);
// Returns whether a new view for a given |site_url| can be launched in a
// given |process_host|.

Powered by Google App Engine
This is Rietveld 408576698