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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) | 80 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) |
81 WebRuntimeFeatures::enableScreenOrientation(false); | 81 WebRuntimeFeatures::enableScreenOrientation(false); |
82 #endif // OS_WIN | 82 #endif // OS_WIN |
83 } | 83 } |
84 | 84 |
85 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 85 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
86 const base::CommandLine& command_line) { | 86 const base::CommandLine& command_line) { |
87 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) | 87 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
88 WebRuntimeFeatures::enableExperimentalFeatures(true); | 88 WebRuntimeFeatures::enableExperimentalFeatures(true); |
89 | 89 |
| 90 if (command_line.HasSwitch(switches::kEnableWebBluetooth)) |
| 91 WebRuntimeFeatures::enableWebBluetooth(true); |
| 92 |
90 SetRuntimeFeatureDefaultsForPlatform(); | 93 SetRuntimeFeatureDefaultsForPlatform(); |
91 | 94 |
92 if (command_line.HasSwitch(switches::kDisableDatabases)) | 95 if (command_line.HasSwitch(switches::kDisableDatabases)) |
93 WebRuntimeFeatures::enableDatabase(false); | 96 WebRuntimeFeatures::enableDatabase(false); |
94 | 97 |
95 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler)) | 98 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler)) |
96 WebRuntimeFeatures::enableBlinkScheduler(false); | 99 WebRuntimeFeatures::enableBlinkScheduler(false); |
97 | 100 |
98 if (command_line.HasSwitch(switches::kDisableMediaSource)) | 101 if (command_line.HasSwitch(switches::kDisableMediaSource)) |
99 WebRuntimeFeatures::enableMediaSource(false); | 102 WebRuntimeFeatures::enableMediaSource(false); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 218 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
216 &disabled_features); | 219 &disabled_features); |
217 for (const std::string& feature : disabled_features) { | 220 for (const std::string& feature : disabled_features) { |
218 WebRuntimeFeatures::enableFeatureFromString( | 221 WebRuntimeFeatures::enableFeatureFromString( |
219 blink::WebString::fromLatin1(feature), false); | 222 blink::WebString::fromLatin1(feature), false); |
220 } | 223 } |
221 } | 224 } |
222 } | 225 } |
223 | 226 |
224 } // namespace content | 227 } // namespace content |
OLD | NEW |