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