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

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: Addressing CR feedback from creis@. 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/common/content_features.h
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 04178037a82674bef80642d9afbc57903e7bbebe..89df2f9a9b7e8775a35fc0f358ec9b36345d7efb 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -72,7 +72,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
+// 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,
+
+// 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")
+
+#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
+};
+
Łukasz Anforowicz 2017/07/01 00:10:53 Charlie - do you have any thoughts on the location
CONTENT_EXPORT extern const base::Feature kTouchpadAndWheelScrollLatching;
CONTENT_EXPORT extern const base::Feature kUseFeaturePolicyForPermissions;
CONTENT_EXPORT extern const base::Feature kUseMojoAudioOutputStreamFactory;

Powered by Google App Engine
This is Rietveld 408576698