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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // non-android versions. | 191 // non-android versions. |
192 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) | 192 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) |
193 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); | 193 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); |
194 | 194 |
195 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) | 195 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) |
196 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); | 196 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); |
197 | 197 |
198 WebRuntimeFeatures::enableMediaDocumentDownloadButton( | 198 WebRuntimeFeatures::enableMediaDocumentDownloadButton( |
199 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); | 199 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); |
200 | 200 |
| 201 if (base::FeatureList::IsEnabled(features::kPointerEvents)) { |
| 202 WebRuntimeFeatures::enableFeatureFromString( |
| 203 std::string("PointerEvent"), true); |
| 204 } |
| 205 |
201 // Enable explicitly enabled features, and then disable explicitly disabled | 206 // Enable explicitly enabled features, and then disable explicitly disabled |
202 // ones. | 207 // ones. |
203 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { | 208 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
204 std::vector<std::string> enabled_features = base::SplitString( | 209 std::vector<std::string> enabled_features = base::SplitString( |
205 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), | 210 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), |
206 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 211 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
207 for (const std::string& feature : enabled_features) | 212 for (const std::string& feature : enabled_features) |
208 WebRuntimeFeatures::enableFeatureFromString(feature, true); | 213 WebRuntimeFeatures::enableFeatureFromString(feature, true); |
209 } | 214 } |
210 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 215 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
211 std::vector<std::string> disabled_features = base::SplitString( | 216 std::vector<std::string> disabled_features = base::SplitString( |
212 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 217 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
213 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 218 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
214 for (const std::string& feature : disabled_features) | 219 for (const std::string& feature : disabled_features) |
215 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 220 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
216 } | 221 } |
217 } | 222 } |
218 | 223 |
219 } // namespace content | 224 } // namespace content |
OLD | NEW |