OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/common/content_switches_internal.h" | 8 #include "content/common/content_switches_internal.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
11 #include "ui/native_theme/native_theme_switches.h" | 11 #include "ui/native_theme/native_theme_switches.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // blink. We don't set this to false in case the user has manually enabled | 58 // blink. We don't set this to false in case the user has manually enabled |
59 // the feature via experimental web platform features. | 59 // the feature via experimental web platform features. |
60 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") | 60 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") |
61 WebRuntimeFeatures::enableNavigationTransitions(true); | 61 WebRuntimeFeatures::enableNavigationTransitions(true); |
62 #else | 62 #else |
63 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 63 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
64 #endif // defined(OS_ANDROID) | 64 #endif // defined(OS_ANDROID) |
65 | 65 |
66 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) | 66 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) |
67 // Only Android, ChromeOS, and IOS support NetInfo right now. | 67 // Only Android, ChromeOS, and IOS support NetInfo right now. |
| 68 if (!command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
68 WebRuntimeFeatures::enableNetworkInformation(false); | 69 WebRuntimeFeatures::enableNetworkInformation(false); |
69 #endif | 70 #endif |
70 } | 71 } |
71 | 72 |
72 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 73 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
73 const CommandLine& command_line) { | 74 const CommandLine& command_line) { |
74 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) | 75 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
75 WebRuntimeFeatures::enableExperimentalFeatures(true); | 76 WebRuntimeFeatures::enableExperimentalFeatures(true); |
76 | 77 |
77 SetRuntimeFeatureDefaultsForPlatform(); | 78 SetRuntimeFeatureDefaultsForPlatform(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 WebRuntimeFeatures::enablePreciseMemoryInfo(true); | 169 WebRuntimeFeatures::enablePreciseMemoryInfo(true); |
169 | 170 |
170 if (command_line.HasSwitch(switches::kEnableLayerSquashing)) | 171 if (command_line.HasSwitch(switches::kEnableLayerSquashing)) |
171 WebRuntimeFeatures::enableLayerSquashing(true); | 172 WebRuntimeFeatures::enableLayerSquashing(true); |
172 | 173 |
173 if (command_line.HasSwitch(switches::kEnableNetworkInformation)) | 174 if (command_line.HasSwitch(switches::kEnableNetworkInformation)) |
174 WebRuntimeFeatures::enableNetworkInformation(true); | 175 WebRuntimeFeatures::enableNetworkInformation(true); |
175 } | 176 } |
176 | 177 |
177 } // namespace content | 178 } // namespace content |
OLD | NEW |