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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 if (command_line.HasSwitch(switches::kDisableFullScreen)) | 104 if (command_line.HasSwitch(switches::kDisableFullScreen)) |
105 WebRuntimeFeatures::enableFullscreen(false); | 105 WebRuntimeFeatures::enableFullscreen(false); |
106 | 106 |
107 if (command_line.HasSwitch(switches::kEnableEncryptedMedia)) | 107 if (command_line.HasSwitch(switches::kEnableEncryptedMedia)) |
108 WebRuntimeFeatures::enableEncryptedMedia(true); | 108 WebRuntimeFeatures::enableEncryptedMedia(true); |
109 | 109 |
110 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) | 110 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) |
111 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); | 111 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); |
112 | 112 |
| 113 // FIXME: Remove the enable switch once Web Animations CSS is enabled by |
| 114 // default in Blink. |
113 if (command_line.HasSwitch(switches::kEnableWebAnimationsCSS)) | 115 if (command_line.HasSwitch(switches::kEnableWebAnimationsCSS)) |
114 WebRuntimeFeatures::enableWebAnimationsCSS(); | 116 WebRuntimeFeatures::enableWebAnimationsCSS(true); |
| 117 else if (command_line.HasSwitch(switches::kDisableWebAnimationsCSS)) |
| 118 WebRuntimeFeatures::enableWebAnimationsCSS(false); |
115 | 119 |
116 if (command_line.HasSwitch(switches::kEnableWebAnimationsSVG)) | 120 if (command_line.HasSwitch(switches::kEnableWebAnimationsSVG)) |
117 WebRuntimeFeatures::enableWebAnimationsSVG(); | 121 WebRuntimeFeatures::enableWebAnimationsSVG(true); |
118 | 122 |
119 if (command_line.HasSwitch(switches::kEnableWebMIDI)) | 123 if (command_line.HasSwitch(switches::kEnableWebMIDI)) |
120 WebRuntimeFeatures::enableWebMIDI(true); | 124 WebRuntimeFeatures::enableWebMIDI(true); |
121 | 125 |
122 if (command_line.HasSwitch(switches::kDisableDeviceMotion)) | 126 if (command_line.HasSwitch(switches::kDisableDeviceMotion)) |
123 WebRuntimeFeatures::enableDeviceMotion(false); | 127 WebRuntimeFeatures::enableDeviceMotion(false); |
124 | 128 |
125 if (command_line.HasSwitch(switches::kDisableDeviceOrientation)) | 129 if (command_line.HasSwitch(switches::kDisableDeviceOrientation)) |
126 WebRuntimeFeatures::enableDeviceOrientation(false); | 130 WebRuntimeFeatures::enableDeviceOrientation(false); |
127 | 131 |
(...skipping 25 matching lines...) Expand all Loading... |
153 WebRuntimeFeatures::enableInputModeAttribute(true); | 157 WebRuntimeFeatures::enableInputModeAttribute(true); |
154 | 158 |
155 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) | 159 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) |
156 WebRuntimeFeatures::enableFastTextAutosizing(true); | 160 WebRuntimeFeatures::enableFastTextAutosizing(true); |
157 | 161 |
158 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) | 162 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) |
159 WebRuntimeFeatures::enableRepaintAfterLayout(true); | 163 WebRuntimeFeatures::enableRepaintAfterLayout(true); |
160 } | 164 } |
161 | 165 |
162 } // namespace content | 166 } // namespace content |
OLD | NEW |