| 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 // 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 | 71 |
| 72 #if defined(OS_CHROMEOS) |
| 73 WebRuntimeFeatures::EnableForceTallerSelectPopup(true); |
| 74 #endif |
| 75 |
| 72 // The Notification Center on Mac OS X does not support content images. | 76 // The Notification Center on Mac OS X does not support content images. |
| 73 #if defined(OS_MACOSX) | 77 #if defined(OS_MACOSX) |
| 74 WebRuntimeFeatures::EnableNotificationContentImage(false); | 78 WebRuntimeFeatures::EnableNotificationContentImage(false); |
| 75 #endif | 79 #endif |
| 76 } | 80 } |
| 77 | 81 |
| 78 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 82 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| 79 const base::CommandLine& command_line) { | 83 const base::CommandLine& command_line) { |
| 80 bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch( | 84 bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch( |
| 81 switches::kEnableExperimentalWebPlatformFeatures); | 85 switches::kEnableExperimentalWebPlatformFeatures); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 392 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 389 std::vector<std::string> disabled_features = base::SplitString( | 393 std::vector<std::string> disabled_features = base::SplitString( |
| 390 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 394 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 391 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 395 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 392 for (const std::string& feature : disabled_features) | 396 for (const std::string& feature : disabled_features) |
| 393 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 397 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
| 394 } | 398 } |
| 395 } | 399 } |
| 396 | 400 |
| 397 } // namespace content | 401 } // namespace content |
| OLD | NEW |