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

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: Rebase 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
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) 247 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners))
248 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); 248 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true);
249 249
250 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling)) 250 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling))
251 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true); 251 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true);
252 252
253 WebRuntimeFeatures::enableFeatureFromString( 253 WebRuntimeFeatures::enableFeatureFromString(
254 "FontCacheScaling", 254 "FontCacheScaling",
255 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 255 base::FeatureList::IsEnabled(features::kFontCacheScaling));
256 256
257 WebRuntimeFeatures::enableFeatureFromString(
258 "FramebustingNeedsSameOriginOrUserGesture",
259 base::FeatureList::IsEnabled(
260 features::kFramebustingNeedsSameOriginOrUserGesture));
261
257 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) 262 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread))
258 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); 263 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true);
259 264
260 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) 265 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling))
261 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); 266 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false);
262 267
263 WebRuntimeFeatures::enableRenderingPipelineThrottling( 268 WebRuntimeFeatures::enableRenderingPipelineThrottling(
264 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); 269 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
265 270
266 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( 271 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames(
(...skipping 23 matching lines...) Expand all
290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 295 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
291 std::vector<std::string> disabled_features = base::SplitString( 296 std::vector<std::string> disabled_features = base::SplitString(
292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 297 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 298 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
294 for (const std::string& feature : disabled_features) 299 for (const std::string& feature : disabled_features)
295 WebRuntimeFeatures::enableFeatureFromString(feature, false); 300 WebRuntimeFeatures::enableFeatureFromString(feature, false);
296 } 301 }
297 } 302 }
298 303
299 } // namespace content 304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698