OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |