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

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

Issue 2244503003: Add flag to force touch events to be passive during fling as a runtime feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set feature to be experimental Created 4 years, 4 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 WebRuntimeFeatures::enableMediaDocumentDownloadButton( 233 WebRuntimeFeatures::enableMediaDocumentDownloadButton(
234 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); 234 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton));
235 235
236 if (base::FeatureList::IsEnabled(features::kPointerEvents)) 236 if (base::FeatureList::IsEnabled(features::kPointerEvents))
237 WebRuntimeFeatures::enablePointerEvent(true); 237 WebRuntimeFeatures::enablePointerEvent(true);
238 238
239 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) 239 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners))
240 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); 240 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true);
241 241
242 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling))
243 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true);
244
242 WebRuntimeFeatures::enableFeatureFromString( 245 WebRuntimeFeatures::enableFeatureFromString(
243 "FontCacheScaling", 246 "FontCacheScaling",
244 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 247 base::FeatureList::IsEnabled(features::kFontCacheScaling));
245 248
246 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) 249 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations))
247 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); 250 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false);
248 251
249 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) 252 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread))
250 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); 253 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true);
251 254
(...skipping 27 matching lines...) Expand all
279 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 282 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
280 std::vector<std::string> disabled_features = base::SplitString( 283 std::vector<std::string> disabled_features = base::SplitString(
281 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 284 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
282 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 285 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
283 for (const std::string& feature : disabled_features) 286 for (const std::string& feature : disabled_features)
284 WebRuntimeFeatures::enableFeatureFromString(feature, false); 287 WebRuntimeFeatures::enableFeatureFromString(feature, false);
285 } 288 }
286 } 289 }
287 290
288 } // namespace content 291 } // 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