| 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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // Android does not have support for PagePopup | 53 // Android does not have support for PagePopup |
| 54 WebRuntimeFeatures::enablePagePopup(false); | 54 WebRuntimeFeatures::enablePagePopup(false); |
| 55 // Android does not yet support SharedWorker. crbug.com/154571 | 55 // Android does not yet support SharedWorker. crbug.com/154571 |
| 56 WebRuntimeFeatures::enableSharedWorker(false); | 56 WebRuntimeFeatures::enableSharedWorker(false); |
| 57 // Android does not yet support NavigatorContentUtils. | 57 // Android does not yet support NavigatorContentUtils. |
| 58 WebRuntimeFeatures::enableNavigatorContentUtils(false); | 58 WebRuntimeFeatures::enableNavigatorContentUtils(false); |
| 59 WebRuntimeFeatures::enableOrientationEvent(true); | 59 WebRuntimeFeatures::enableOrientationEvent(true); |
| 60 WebRuntimeFeatures::enableFastMobileScrolling(true); | 60 WebRuntimeFeatures::enableFastMobileScrolling(true); |
| 61 WebRuntimeFeatures::enableMediaCapture(true); | 61 WebRuntimeFeatures::enableMediaCapture(true); |
| 62 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); | 62 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); |
| 63 // If navigation transitions gets activated via field trial, enable it in | |
| 64 // blink. We don't set this to false in case the user has manually enabled | |
| 65 // the feature via experimental web platform features. | |
| 66 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") | |
| 67 WebRuntimeFeatures::enableNavigationTransitions(true); | |
| 68 // Android won't be able to reliably support non-persistent notifications, the | 63 // Android won't be able to reliably support non-persistent notifications, the |
| 69 // intended behavior for which is in flux by itself. | 64 // intended behavior for which is in flux by itself. |
| 70 WebRuntimeFeatures::enableNotificationConstructor(false); | 65 WebRuntimeFeatures::enableNotificationConstructor(false); |
| 71 #else | 66 #else |
| 72 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 67 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
| 73 #endif // defined(OS_ANDROID) | 68 #endif // defined(OS_ANDROID) |
| 74 | 69 |
| 75 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) | 70 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) |
| 76 // Only Android, ChromeOS, and IOS support NetInfo right now. | 71 // Only Android, ChromeOS, and IOS support NetInfo right now. |
| 77 WebRuntimeFeatures::enableNetworkInformation(false); | 72 WebRuntimeFeatures::enableNetworkInformation(false); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 215 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
| 221 &disabled_features); | 216 &disabled_features); |
| 222 for (const std::string& feature : disabled_features) { | 217 for (const std::string& feature : disabled_features) { |
| 223 WebRuntimeFeatures::enableFeatureFromString( | 218 WebRuntimeFeatures::enableFeatureFromString( |
| 224 blink::WebString::fromLatin1(feature), false); | 219 blink::WebString::fromLatin1(feature), false); |
| 225 } | 220 } |
| 226 } | 221 } |
| 227 } | 222 } |
| 228 | 223 |
| 229 } // namespace content | 224 } // namespace content |
| OLD | NEW |