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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 switches::kEnableExperimentalWebPlatformFeatures); | 62 switches::kEnableExperimentalWebPlatformFeatures); |
63 if (enableExperimentalWebPlatformFeatures) | 63 if (enableExperimentalWebPlatformFeatures) |
64 WebRuntimeFeatures::enableExperimentalFeatures(true); | 64 WebRuntimeFeatures::enableExperimentalFeatures(true); |
65 | 65 |
66 WebRuntimeFeatures::enableOriginTrials( | 66 WebRuntimeFeatures::enableOriginTrials( |
67 base::FeatureList::IsEnabled(features::kOriginTrials)); | 67 base::FeatureList::IsEnabled(features::kOriginTrials)); |
68 | 68 |
69 WebRuntimeFeatures::enableFeaturePolicy( | 69 WebRuntimeFeatures::enableFeaturePolicy( |
70 base::FeatureList::IsEnabled(features::kFeaturePolicy)); | 70 base::FeatureList::IsEnabled(features::kFeaturePolicy)); |
71 | 71 |
72 if (command_line.HasSwitch(switches::kEnableWebBluetooth)) | 72 bool enable_web_bluetooth = enableExperimentalWebPlatformFeatures; |
scheib
2016/10/21 01:02:10
Let's explain this with
// Web Bluetooth is shipp
juncai
2016/10/21 16:57:54
Done.
| |
73 WebRuntimeFeatures::enableWebBluetooth(true); | 73 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
74 enable_web_bluetooth = true; | |
75 #endif | |
76 WebRuntimeFeatures::enableWebBluetooth(enable_web_bluetooth); | |
74 | 77 |
75 if (!base::FeatureList::IsEnabled(features::kWebUsb)) | 78 if (!base::FeatureList::IsEnabled(features::kWebUsb)) |
76 WebRuntimeFeatures::enableWebUsb(false); | 79 WebRuntimeFeatures::enableWebUsb(false); |
77 | 80 |
78 SetRuntimeFeatureDefaultsForPlatform(); | 81 SetRuntimeFeatureDefaultsForPlatform(); |
79 | 82 |
80 if (command_line.HasSwitch(switches::kDisableDatabases)) | 83 if (command_line.HasSwitch(switches::kDisableDatabases)) |
81 WebRuntimeFeatures::enableDatabase(false); | 84 WebRuntimeFeatures::enableDatabase(false); |
82 | 85 |
83 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 86 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 331 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
329 std::vector<std::string> disabled_features = base::SplitString( | 332 std::vector<std::string> disabled_features = base::SplitString( |
330 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 333 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
331 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 334 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
332 for (const std::string& feature : disabled_features) | 335 for (const std::string& feature : disabled_features) |
333 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 336 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
334 } | 337 } |
335 } | 338 } |
336 | 339 |
337 } // namespace content | 340 } // namespace content |
OLD | NEW |