| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #if defined(OS_ANDROID) | 84 #if defined(OS_ANDROID) |
| 85 if (command_line.HasSwitch(switches::kDisableWebRTC)) { | 85 if (command_line.HasSwitch(switches::kDisableWebRTC)) { |
| 86 WebRuntimeFeatures::enableMediaStream(false); | 86 WebRuntimeFeatures::enableMediaStream(false); |
| 87 WebRuntimeFeatures::enablePeerConnection(false); | 87 WebRuntimeFeatures::enablePeerConnection(false); |
| 88 } | 88 } |
| 89 | 89 |
| 90 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition)) | 90 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition)) |
| 91 WebRuntimeFeatures::enableScriptedSpeech(false); | 91 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 if (command_line.HasSwitch(switches::kEnableServiceWorker)) |
| 95 WebRuntimeFeatures::enableServiceWorker(true); |
| 96 |
| 94 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 97 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
| 95 WebRuntimeFeatures::enableWebAudio(false); | 98 WebRuntimeFeatures::enableWebAudio(false); |
| 96 | 99 |
| 97 if (command_line.HasSwitch(switches::kDisableFullScreen)) | 100 if (command_line.HasSwitch(switches::kDisableFullScreen)) |
| 98 WebRuntimeFeatures::enableFullscreen(false); | 101 WebRuntimeFeatures::enableFullscreen(false); |
| 99 | 102 |
| 100 if (command_line.HasSwitch(switches::kEnableEncryptedMedia)) | 103 if (command_line.HasSwitch(switches::kEnableEncryptedMedia)) |
| 101 WebRuntimeFeatures::enableEncryptedMedia(true); | 104 WebRuntimeFeatures::enableEncryptedMedia(true); |
| 102 | 105 |
| 103 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) | 106 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 WebRuntimeFeatures::enableOverlayScrollbars(true); | 146 WebRuntimeFeatures::enableOverlayScrollbars(true); |
| 144 | 147 |
| 145 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) | 148 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) |
| 146 WebRuntimeFeatures::enableInputModeAttribute(true); | 149 WebRuntimeFeatures::enableInputModeAttribute(true); |
| 147 | 150 |
| 148 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) | 151 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) |
| 149 WebRuntimeFeatures::enableFastTextAutosizing(true); | 152 WebRuntimeFeatures::enableFastTextAutosizing(true); |
| 150 } | 153 } |
| 151 | 154 |
| 152 } // namespace content | 155 } // namespace content |
| OLD | NEW |