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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Android does not have support for PagePopup | 49 // Android does not have support for PagePopup |
50 WebRuntimeFeatures::enablePagePopup(false); | 50 WebRuntimeFeatures::enablePagePopup(false); |
51 // Android does not yet support SharedWorker. crbug.com/154571 | 51 // Android does not yet support SharedWorker. crbug.com/154571 |
52 WebRuntimeFeatures::enableSharedWorker(false); | 52 WebRuntimeFeatures::enableSharedWorker(false); |
53 // Android does not yet support NavigatorContentUtils. | 53 // Android does not yet support NavigatorContentUtils. |
54 WebRuntimeFeatures::enableNavigatorContentUtils(false); | 54 WebRuntimeFeatures::enableNavigatorContentUtils(false); |
55 WebRuntimeFeatures::enableTouchIconLoading(true); | 55 WebRuntimeFeatures::enableTouchIconLoading(true); |
56 WebRuntimeFeatures::enableOrientationEvent(true); | 56 WebRuntimeFeatures::enableOrientationEvent(true); |
57 WebRuntimeFeatures::enableFastMobileScrolling(true); | 57 WebRuntimeFeatures::enableFastMobileScrolling(true); |
58 WebRuntimeFeatures::enableMediaCapture(true); | 58 WebRuntimeFeatures::enableMediaCapture(true); |
59 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); | |
60 // If navigation transitions gets activated via field trial, enable it in | 59 // If navigation transitions gets activated via field trial, enable it in |
61 // blink. We don't set this to false in case the user has manually enabled | 60 // blink. We don't set this to false in case the user has manually enabled |
62 // the feature via experimental web platform features. | 61 // the feature via experimental web platform features. |
63 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") | 62 if (base::FieldTrialList::FindFullName("NavigationTransitions") == "Enabled") |
64 WebRuntimeFeatures::enableNavigationTransitions(true); | 63 WebRuntimeFeatures::enableNavigationTransitions(true); |
65 // Android won't be able to reliably support non-persistent notifications, the | 64 // Android won't be able to reliably support non-persistent notifications, the |
66 // intended behavior for which is in flux by itself. | 65 // intended behavior for which is in flux by itself. |
67 WebRuntimeFeatures::enableNotificationConstructor(false); | 66 WebRuntimeFeatures::enableNotificationConstructor(false); |
68 #else | 67 #else |
69 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 68 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
70 #endif // defined(OS_ANDROID) | 69 #endif // defined(OS_ANDROID) |
71 | 70 |
| 71 #if defined(OS_ANDROID) || defined(USE_AURA) |
| 72 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); |
| 73 #endif |
| 74 |
72 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) | 75 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) |
73 // Only Android, ChromeOS, and IOS support NetInfo right now. | 76 // Only Android, ChromeOS, and IOS support NetInfo right now. |
74 WebRuntimeFeatures::enableNetworkInformation(false); | 77 WebRuntimeFeatures::enableNetworkInformation(false); |
75 #endif | 78 #endif |
76 | 79 |
77 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
78 // Screen Orientation API is currently broken on Windows 8 Metro mode and | 81 // Screen Orientation API is currently broken on Windows 8 Metro mode and |
79 // until we can find how to disable it only for Blink instances running in a | 82 // until we can find how to disable it only for Blink instances running in a |
80 // renderer process in Metro, we need to disable the API altogether for Win8. | 83 // renderer process in Metro, we need to disable the API altogether for Win8. |
81 // See http://crbug.com/400846 | 84 // See http://crbug.com/400846 |
(...skipping 138 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 |