| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // Web Bluetooth is shipped on Android, ChromeOS & MacOS, experimental | 67 // Web Bluetooth is shipped on Android, ChromeOS & MacOS, experimental |
| 68 // otherwise. | 68 // otherwise. |
| 69 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 69 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
| 70 WebRuntimeFeatures::EnableWebBluetooth(true); | 70 WebRuntimeFeatures::EnableWebBluetooth(true); |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 #if defined(OS_CHROMEOS) | 73 #if defined(OS_CHROMEOS) |
| 74 WebRuntimeFeatures::EnableForceTallerSelectPopup(true); | 74 WebRuntimeFeatures::EnableForceTallerSelectPopup(true); |
| 75 #endif | 75 #endif |
| 76 |
| 77 // The Notification Center on Mac OS X does not support content images. |
| 78 #if !defined(OS_MACOSX) |
| 79 WebRuntimeFeatures::EnableNotificationContentImage(true); |
| 80 #endif |
| 76 } | 81 } |
| 77 | 82 |
| 78 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 83 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| 79 const base::CommandLine& command_line) { | 84 const base::CommandLine& command_line) { |
| 80 bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch( | 85 bool enableExperimentalWebPlatformFeatures = command_line.HasSwitch( |
| 81 switches::kEnableExperimentalWebPlatformFeatures); | 86 switches::kEnableExperimentalWebPlatformFeatures); |
| 82 if (enableExperimentalWebPlatformFeatures) | 87 if (enableExperimentalWebPlatformFeatures) |
| 83 WebRuntimeFeatures::EnableExperimentalFeatures(true); | 88 WebRuntimeFeatures::EnableExperimentalFeatures(true); |
| 84 | 89 |
| 85 WebRuntimeFeatures::EnableOriginTrials( | 90 WebRuntimeFeatures::EnableOriginTrials( |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 381 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 377 std::vector<std::string> disabled_features = base::SplitString( | 382 std::vector<std::string> disabled_features = base::SplitString( |
| 378 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 383 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 379 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 384 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 380 for (const std::string& feature : disabled_features) | 385 for (const std::string& feature : disabled_features) |
| 381 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 386 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
| 382 } | 387 } |
| 383 } | 388 } |
| 384 | 389 |
| 385 } // namespace content | 390 } // namespace content |
| OLD | NEW |