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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 | 200 |
201 if (command_line.HasSwitch(switches::kEnableWebVR)) { | 201 if (command_line.HasSwitch(switches::kEnableWebVR)) { |
202 WebRuntimeFeatures::enableWebVR(true); | 202 WebRuntimeFeatures::enableWebVR(true); |
203 WebRuntimeFeatures::enableFeatureFromString( | 203 WebRuntimeFeatures::enableFeatureFromString( |
204 std::string("GeometryInterfaces"), true); | 204 std::string("GeometryInterfaces"), true); |
205 } | 205 } |
206 | 206 |
207 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) | 207 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) |
208 WebRuntimeFeatures::enablePresentationAPI(false); | 208 WebRuntimeFeatures::enablePresentationAPI(false); |
209 | 209 |
210 if (command_line.HasSwitch(switches::kEnablePointerEvents)) { | |
211 WebRuntimeFeatures::enableFeatureFromString( | |
Rick Byers
2016/01/08 19:38:24
nit: Might as well add a enablePointerEvent method
| |
212 std::string("PointerEvent"), true); | |
213 } | |
214 | |
210 // Enable explicitly enabled features, and then disable explicitly disabled | 215 // Enable explicitly enabled features, and then disable explicitly disabled |
211 // ones. | 216 // ones. |
212 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { | 217 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
213 std::vector<std::string> enabled_features = base::SplitString( | 218 std::vector<std::string> enabled_features = base::SplitString( |
214 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), | 219 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), |
215 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 220 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
216 for (const std::string& feature : enabled_features) | 221 for (const std::string& feature : enabled_features) |
217 WebRuntimeFeatures::enableFeatureFromString(feature, true); | 222 WebRuntimeFeatures::enableFeatureFromString(feature, true); |
218 } | 223 } |
219 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 224 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
220 std::vector<std::string> disabled_features = base::SplitString( | 225 std::vector<std::string> disabled_features = base::SplitString( |
221 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 226 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
222 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 227 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
223 for (const std::string& feature : disabled_features) | 228 for (const std::string& feature : disabled_features) |
224 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 229 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
225 } | 230 } |
226 } | 231 } |
227 | 232 |
228 } // namespace content | 233 } // namespace content |
OLD | NEW |