| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 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); | |
| 63 // If navigation transitions gets activated via field trial, enable it in | 62 // 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 | 63 // blink. We don't set this to false in case the user has manually enabled |
| 65 // the feature via experimental web platform features. | 64 // the feature via experimental web platform features. |
| 66 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") | 65 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") |
| 67 WebRuntimeFeatures::enableNavigationTransitions(true); | 66 WebRuntimeFeatures::enableNavigationTransitions(true); |
| 68 // Android won't be able to reliably support non-persistent notifications, the | 67 // Android won't be able to reliably support non-persistent notifications, the |
| 69 // intended behavior for which is in flux by itself. | 68 // intended behavior for which is in flux by itself. |
| 70 WebRuntimeFeatures::enableNotificationConstructor(false); | 69 WebRuntimeFeatures::enableNotificationConstructor(false); |
| 71 #else | 70 #else |
| 72 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 71 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
| 73 #endif // defined(OS_ANDROID) | 72 #endif // defined(OS_ANDROID) |
| 74 | 73 |
| 74 #if defined(OS_ANDROID) || defined(USE_AURA) |
| 75 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); |
| 76 #endif |
| 77 |
| 75 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) | 78 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) |
| 76 // Only Android, ChromeOS, and IOS support NetInfo right now. | 79 // Only Android, ChromeOS, and IOS support NetInfo right now. |
| 77 WebRuntimeFeatures::enableNetworkInformation(false); | 80 WebRuntimeFeatures::enableNetworkInformation(false); |
| 78 #endif | 81 #endif |
| 79 | 82 |
| 80 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
| 81 // Screen Orientation API is currently broken on Windows 8 Metro mode and | 84 // Screen Orientation API is currently broken on Windows 8 Metro mode and |
| 82 // until we can find how to disable it only for Blink instances running in a | 85 // until we can find how to disable it only for Blink instances running in a |
| 83 // renderer process in Metro, we need to disable the API altogether for Win8. | 86 // renderer process in Metro, we need to disable the API altogether for Win8. |
| 84 // See http://crbug.com/400846 | 87 // See http://crbug.com/400846 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 223 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
| 221 &disabled_features); | 224 &disabled_features); |
| 222 for (const std::string& feature : disabled_features) { | 225 for (const std::string& feature : disabled_features) { |
| 223 WebRuntimeFeatures::enableFeatureFromString( | 226 WebRuntimeFeatures::enableFeatureFromString( |
| 224 blink::WebString::fromLatin1(feature), false); | 227 blink::WebString::fromLatin1(feature), false); |
| 225 } | 228 } |
| 226 } | 229 } |
| 227 } | 230 } |
| 228 | 231 |
| 229 } // namespace content | 232 } // namespace content |
| OLD | NEW |