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

Side by Side 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 2 more CR comments from csharrison@. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines all the public base::FeatureList features for the content 5 // This file defines all the public base::FeatureList features for the content
6 // module. 6 // module.
7 7
8 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_ 8 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_
9 #define CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_ 9 #define CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 kRequireSecureOriginsForPepperMediaRequests; 68 kRequireSecureOriginsForPepperMediaRequests;
69 CONTENT_EXPORT extern const base::Feature kResourceLoadScheduler; 69 CONTENT_EXPORT extern const base::Feature kResourceLoadScheduler;
70 CONTENT_EXPORT extern const base::Feature kScrollAnchoring; 70 CONTENT_EXPORT extern const base::Feature kScrollAnchoring;
71 CONTENT_EXPORT extern const base::Feature kServiceWorkerNavigationPreload; 71 CONTENT_EXPORT extern const base::Feature kServiceWorkerNavigationPreload;
72 CONTENT_EXPORT extern const base::Feature kServiceWorkerScriptStreaming; 72 CONTENT_EXPORT extern const base::Feature kServiceWorkerScriptStreaming;
73 CONTENT_EXPORT extern const base::Feature kSharedArrayBuffer; 73 CONTENT_EXPORT extern const base::Feature kSharedArrayBuffer;
74 CONTENT_EXPORT extern const base::Feature kSkipCompositingSmallScrollers; 74 CONTENT_EXPORT extern const base::Feature kSkipCompositingSmallScrollers;
75 CONTENT_EXPORT extern const base::Feature kSlimmingPaintInvalidation; 75 CONTENT_EXPORT extern const base::Feature kSlimmingPaintInvalidation;
76 CONTENT_EXPORT extern const base::Feature kTimerThrottlingForHiddenFrames; 76 CONTENT_EXPORT extern const base::Feature kTimerThrottlingForHiddenFrames;
77 CONTENT_EXPORT extern const base::Feature kTokenBinding; 77 CONTENT_EXPORT extern const base::Feature kTokenBinding;
78
78 CONTENT_EXPORT extern const base::Feature kTopDocumentIsolation; 79 CONTENT_EXPORT extern const base::Feature kTopDocumentIsolation;
80
81 // If the kTopDocumentIsolation base::Feature is enabled, then it can be
82 // configured by additional parameters (see also GetFieldTrialParamsByFeature).
83 // |kTopDocumentIsolationModeParam| is the name of an optional parameter that
84 // specifies TopDocumentIsolationMode. Valid values of this parameter are
85 // strings that represent numeric values of TopDocumentIsolationMode enum values
86 // (e.g. "1" for TopDocumentIsolationMode::CrossSite).
87 CONTENT_EXPORT extern const char kTopDocumentIsolationModeParam[];
88
89 // If the kTopDocumentIsolation base::Feature is enabled, the values of this
90 // enum represent the mode for selecting *which* frames to isolate.
91 //
92 // These values should NOT be renumbered, because 1) they can be specified in a
93 // server-side trial config and 2) they can be persisted in the state of
94 // chrome://flags selected by the user.
95 enum class TopDocumentIsolationMode {
96 // This value indicates that kTopDocumentIsolationModeParam was not specified.
97 // Corresponds to "Enabled" state in chrome://flags (i.e. the user didn't
98 // select a more specific isolation mode).
99 Unspecified = 0,
100
101 // Each of the modes below corresponds to "Enabled (<name> - <description>)"
102 // state in chrome://flags.
103 #define FOR_EACH_TDI_MODE(V) \
104 V(CrossSite, 1, \
105 "isolate all frames from sites other than the top-level frame") \
106 V(Ads, 2, "isolate only cross-site ads detected by heuristics")
107
108 #define DEFINE_TDI_MODE_ENUM_VALUE(name, value, description) name = value,
109 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_ENUM_VALUE)
110 #undef DEFINE_TDI_MODE_ENUM_VALUE
111 };
112
79 CONTENT_EXPORT extern const base::Feature kTouchpadAndWheelScrollLatching; 113 CONTENT_EXPORT extern const base::Feature kTouchpadAndWheelScrollLatching;
80 CONTENT_EXPORT extern const base::Feature kUseFeaturePolicyForPermissions; 114 CONTENT_EXPORT extern const base::Feature kUseFeaturePolicyForPermissions;
81 CONTENT_EXPORT extern const base::Feature kUseMojoAudioOutputStreamFactory; 115 CONTENT_EXPORT extern const base::Feature kUseMojoAudioOutputStreamFactory;
82 CONTENT_EXPORT extern const base::Feature kVibrateRequiresUserGesture; 116 CONTENT_EXPORT extern const base::Feature kVibrateRequiresUserGesture;
83 CONTENT_EXPORT extern const base::Feature kVrShell; 117 CONTENT_EXPORT extern const base::Feature kVrShell;
84 CONTENT_EXPORT extern const base::Feature kWebAssembly; 118 CONTENT_EXPORT extern const base::Feature kWebAssembly;
85 CONTENT_EXPORT extern const base::Feature kWebAssemblyStreaming; 119 CONTENT_EXPORT extern const base::Feature kWebAssemblyStreaming;
86 CONTENT_EXPORT extern const base::Feature kWebAssemblyTrapHandler; 120 CONTENT_EXPORT extern const base::Feature kWebAssemblyTrapHandler;
87 CONTENT_EXPORT extern const base::Feature kWebAuth; 121 CONTENT_EXPORT extern const base::Feature kWebAuth;
88 CONTENT_EXPORT extern const base::Feature kWebGLImageChromium; 122 CONTENT_EXPORT extern const base::Feature kWebGLImageChromium;
(...skipping 24 matching lines...) Expand all
113 CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac; 147 CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac;
114 CONTENT_EXPORT extern const base::Feature kMacV2Sandbox; 148 CONTENT_EXPORT extern const base::Feature kMacV2Sandbox;
115 #endif // defined(OS_MACOSX) 149 #endif // defined(OS_MACOSX)
116 150
117 // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in 151 // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
118 // alphabetical order, or in one of the ifdefs (also in order in each section). 152 // alphabetical order, or in one of the ifdefs (also in order in each section).
119 153
120 } // namespace features 154 } // namespace features
121 155
122 #endif // CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_ 156 #endif // CONTENT_PUBLIC_COMMON_CONTENT_FEATURES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698