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

Side by Side Diff: content/child/runtime_features.cc

Issue 2092293002: Block framebusts without a user gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better flag description Created 4 years, 3 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) 255 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners))
256 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); 256 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true);
257 257
258 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling)) 258 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling))
259 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true); 259 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true);
260 260
261 WebRuntimeFeatures::enableFeatureFromString( 261 WebRuntimeFeatures::enableFeatureFromString(
262 "FontCacheScaling", 262 "FontCacheScaling",
263 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 263 base::FeatureList::IsEnabled(features::kFontCacheScaling));
264 264
265 WebRuntimeFeatures::enableFeatureFromString(
266 "FramebustingNeedsSameOriginOrUserGesture",
267 base::FeatureList::IsEnabled(
268 features::kFramebustingNeedsSameOriginOrUserGesture));
269
265 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) 270 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread))
266 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); 271 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true);
267 272
268 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) 273 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling))
269 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); 274 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false);
270 275
271 WebRuntimeFeatures::enableRenderingPipelineThrottling( 276 WebRuntimeFeatures::enableRenderingPipelineThrottling(
272 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); 277 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
273 278
274 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( 279 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames(
(...skipping 26 matching lines...) Expand all
301 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 306 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
302 std::vector<std::string> disabled_features = base::SplitString( 307 std::vector<std::string> disabled_features = base::SplitString(
303 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 308 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
304 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 309 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
305 for (const std::string& feature : disabled_features) 310 for (const std::string& feature : disabled_features)
306 WebRuntimeFeatures::enableFeatureFromString(feature, false); 311 WebRuntimeFeatures::enableFeatureFromString(feature, false);
307 } 312 }
308 } 313 }
309 314
310 } // namespace content 315 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698