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

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: 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/common/content_features.h
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 04178037a82674bef80642d9afbc57903e7bbebe..6167855374f2c05f9e34b1226250d35297ca1504 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -72,7 +72,22 @@ 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[];
+#define FOR_EACH_TDI_MODE(V) \
+ V(Xsite, 1, "isolate all frames from sites other than the top-level frame") \
Charlie Reis 2017/06/30 23:28:49 We don't really use the term Xsite anywhere in Chr
Łukasz Anforowicz 2017/07/01 00:10:53 Thanks for catching "Xsite". I've changed this to
Charlie Reis 2017/07/06 20:02:29 Oh, I'm fine with the mode description here in the
Łukasz Anforowicz 2017/07/06 20:41:57 Oh, right :-). I've updated the CL description.
+ V(Ads, 2, "isolate ads detected by heuristics")
+
+enum class TopDocumentIsolationMode {
+ Default = 0,
Charlie Reis 2017/06/30 23:28:48 Sorry, I'm getting confused about the difference b
Łukasz Anforowicz 2017/07/01 00:10:53 I've added a comment to the code above. chrome://
+
+#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;

Powered by Google App Engine
This is Rietveld 408576698