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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 WebRuntimeFeatures::enableV8IdleTasks(false); | 195 WebRuntimeFeatures::enableV8IdleTasks(false); |
196 else | 196 else |
197 WebRuntimeFeatures::enableV8IdleTasks(true); | 197 WebRuntimeFeatures::enableV8IdleTasks(true); |
198 | 198 |
199 if (command_line.HasSwitch(switches::kEnableWebVR)) | 199 if (command_line.HasSwitch(switches::kEnableWebVR)) |
200 WebRuntimeFeatures::enableWebVR(true); | 200 WebRuntimeFeatures::enableWebVR(true); |
201 | 201 |
202 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) | 202 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) |
203 WebRuntimeFeatures::enablePresentationAPI(false); | 203 WebRuntimeFeatures::enablePresentationAPI(false); |
204 | 204 |
| 205 if (command_line.HasSwitch(switches::kDisableRemotePlaybackAPI)) |
| 206 WebRuntimeFeatures::enableRemotePlaybackAPI(false); |
| 207 |
205 const std::string webfonts_intervention_v2_group_name = | 208 const std::string webfonts_intervention_v2_group_name = |
206 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); | 209 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); |
207 const std::string webfonts_intervention_v2_about_flag = | 210 const std::string webfonts_intervention_v2_about_flag = |
208 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); | 211 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); |
209 if (!webfonts_intervention_v2_about_flag.empty()) { | 212 if (!webfonts_intervention_v2_about_flag.empty()) { |
210 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( | 213 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( |
211 webfonts_intervention_v2_about_flag.compare( | 214 webfonts_intervention_v2_about_flag.compare( |
212 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == | 215 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == |
213 0); | 216 0); |
214 WebRuntimeFeatures::enableWebFontsInterventionV2With3G( | 217 WebRuntimeFeatures::enableWebFontsInterventionV2With3G( |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 342 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
340 std::vector<std::string> disabled_features = base::SplitString( | 343 std::vector<std::string> disabled_features = base::SplitString( |
341 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 344 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
342 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 345 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
343 for (const std::string& feature : disabled_features) | 346 for (const std::string& feature : disabled_features) |
344 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 347 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
345 } | 348 } |
346 } | 349 } |
347 | 350 |
348 } // namespace content | 351 } // namespace content |
OLD | NEW |