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

Unified Diff: content/public/common/content_features.h

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Rebasing and git-cl-format 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
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/common/content_features.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/content_features.h
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 7ee19ae40f9dc5e9487309f15732dd4d8d10e8a3..105f14951656fdb88a79739988f6de8434ecc224 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -71,7 +71,30 @@ CONTENT_EXPORT extern const base::Feature kSkipCompositingSmallScrollers;
CONTENT_EXPORT extern const base::Feature kSlimmingPaintInvalidation;
CONTENT_EXPORT extern const base::Feature kTimerThrottlingForHiddenFrames;
CONTENT_EXPORT extern const base::Feature kTokenBinding;
+
CONTENT_EXPORT extern const base::Feature kTopDocumentIsolation;
+
+CONTENT_EXPORT extern const char kTopDocumentIsolationModeParam[];
+
+// If TopDocumentIsolation is enabled, the mode for selecting *which* frames to
Charlie Reis 2017/07/06 20:02:29 nit: Let's be a bit more specific: If the kTopDocu
Łukasz Anforowicz 2017/07/06 20:41:58 Done. I've also tweaked the comments for kTopDocu
+// isolate can be one of the enum values below.
+enum class TopDocumentIsolationMode {
+ // Corresponds to "Enabled" state in chrome://flags (i.e. the user didn't
+ // select a more specific isolation mode).
+ Default = 0,
Charlie Reis 2017/07/06 20:02:29 Are there any constraints on this name? I'm wonde
Łukasz Anforowicz 2017/07/06 20:41:58 No constraints. I've renamed to Unspecified.
+
+// Each of the modes below corresponds to "Enabled (<name> - <description>)"
+// state in chrome://flags.
+#define FOR_EACH_TDI_MODE(V) \
+ V(CrossSite, 1, \
+ "isolate all frames from sites other than the top-level frame") \
+ V(Ads, 2, "isolate ads detected by heuristics")
Charlie Reis 2017/07/06 20:02:29 nit: "isolate only cross-site ads detected by heur
Łukasz Anforowicz 2017/07/06 20:41:58 Done.
+
+#define DEFINE_TDI_MODE_ENUM_VALUE(name, value, description) name = value,
+ FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_ENUM_VALUE)
+#undef DEFINE_TDI_MODE_ENUM_VALUE
+};
+
CONTENT_EXPORT extern const base::Feature kTouchpadAndWheelScrollLatching;
CONTENT_EXPORT extern const base::Feature kUseFeaturePolicyForPermissions;
CONTENT_EXPORT extern const base::Feature kUseMojoAudioOutputStreamFactory;
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/common/content_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698