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

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

Issue 2127163002: Limit PassiveDocumentEventListeners to touch and make it experimental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) 226 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator))
227 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); 227 WebRuntimeFeatures::enableDocumentWriteEvaluator(true);
228 228
229 WebRuntimeFeatures::enableMediaDocumentDownloadButton( 229 WebRuntimeFeatures::enableMediaDocumentDownloadButton(
230 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); 230 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton));
231 231
232 if (base::FeatureList::IsEnabled(features::kPointerEvents)) 232 if (base::FeatureList::IsEnabled(features::kPointerEvents))
233 WebRuntimeFeatures::enablePointerEvent(true); 233 WebRuntimeFeatures::enablePointerEvent(true);
234 234
235 WebRuntimeFeatures::enablePassiveDocumentEventListeners( 235 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners))
236 base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)); 236 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true);
237 237
238 WebRuntimeFeatures::enableFeatureFromString( 238 WebRuntimeFeatures::enableFeatureFromString(
239 "FontCacheScaling", 239 "FontCacheScaling",
240 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 240 base::FeatureList::IsEnabled(features::kFontCacheScaling));
241 241
242 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) 242 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations))
243 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); 243 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false);
244 244
245 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) 245 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread))
246 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); 246 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true);
(...skipping 13 matching lines...) Expand all
260 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 260 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
261 std::vector<std::string> disabled_features = base::SplitString( 261 std::vector<std::string> disabled_features = base::SplitString(
262 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 262 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
263 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 263 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
264 for (const std::string& feature : disabled_features) 264 for (const std::string& feature : disabled_features)
265 WebRuntimeFeatures::enableFeatureFromString(feature, false); 265 WebRuntimeFeatures::enableFeatureFromString(feature, false);
266 } 266 }
267 } 267 }
268 268
269 } // namespace content 269 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698