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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #if !(defined OS_ANDROID || defined OS_CHROMEOS) | 61 #if !(defined OS_ANDROID || defined OS_CHROMEOS) |
62 // Only Android, ChromeOS support NetInfo right now. | 62 // Only Android, ChromeOS support NetInfo right now. |
63 WebRuntimeFeatures::enableNetworkInformation(false); | 63 WebRuntimeFeatures::enableNetworkInformation(false); |
64 #endif | 64 #endif |
65 | 65 |
66 // Web Bluetooth is shipped on Android, ChromeOS & MacOS, experimental | 66 // Web Bluetooth is shipped on Android, ChromeOS & MacOS, experimental |
67 // otherwise. | 67 // otherwise. |
68 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 68 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
69 WebRuntimeFeatures::enableWebBluetooth(true); | 69 WebRuntimeFeatures::enableWebBluetooth(true); |
70 #endif | 70 #endif |
71 | |
72 // The Notification Center on Mac OS X does not support content images. | |
73 #if defined(OS_MACOSX) | |
74 WebRuntimeFeatures::enableNotificationContentImage(false); | |
75 #endif | |
76 } | 71 } |
77 | 72 |
78 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 73 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
79 const base::CommandLine& command_line) { | 74 const base::CommandLine& command_line) { |
80 bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch( | 75 bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch( |
81 switches::kEnableExperimentalWebPlatformFeatures); | 76 switches::kEnableExperimentalWebPlatformFeatures); |
82 if (enableExperimentalWebPlatformFeatures) | 77 if (enableExperimentalWebPlatformFeatures) |
83 WebRuntimeFeatures::enableExperimentalFeatures(true); | 78 WebRuntimeFeatures::enableExperimentalFeatures(true); |
84 | 79 |
85 WebRuntimeFeatures::enableOriginTrials( | 80 WebRuntimeFeatures::enableOriginTrials( |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 383 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
389 std::vector<std::string> disabled_features = base::SplitString( | 384 std::vector<std::string> disabled_features = base::SplitString( |
390 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 385 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
391 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 386 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
392 for (const std::string& feature : disabled_features) | 387 for (const std::string& feature : disabled_features) |
393 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 388 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
394 } | 389 } |
395 } | 390 } |
396 | 391 |
397 } // namespace content | 392 } // namespace content |
OLD | NEW |