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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 if (command_line.HasSwitch(switches::kDisableWebKitMediaSource)) | 63 if (command_line.HasSwitch(switches::kDisableWebKitMediaSource)) |
64 WebRuntimeFeatures::enableWebKitMediaSource(false); | 64 WebRuntimeFeatures::enableWebKitMediaSource(false); |
65 | 65 |
66 #if defined(OS_ANDROID) | 66 #if defined(OS_ANDROID) |
67 if (command_line.HasSwitch(switches::kDisableWebRTC)) { | 67 if (command_line.HasSwitch(switches::kDisableWebRTC)) { |
68 WebRuntimeFeatures::enableMediaStream(false); | 68 WebRuntimeFeatures::enableMediaStream(false); |
69 WebRuntimeFeatures::enablePeerConnection(false); | 69 WebRuntimeFeatures::enablePeerConnection(false); |
70 } | 70 } |
71 | 71 |
72 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition)) | 72 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition) || |
| 73 !command_line.HasSwitch( |
| 74 switches::kEnableExperimentalWebPlatformFeatures)) { |
73 WebRuntimeFeatures::enableScriptedSpeech(false); | 75 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 76 } |
74 #endif | 77 #endif |
75 | 78 |
76 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 79 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
77 WebRuntimeFeatures::enableWebAudio(false); | 80 WebRuntimeFeatures::enableWebAudio(false); |
78 | 81 |
79 if (command_line.HasSwitch(switches::kDisableFullScreen)) | 82 if (command_line.HasSwitch(switches::kDisableFullScreen)) |
80 WebRuntimeFeatures::enableFullscreen(false); | 83 WebRuntimeFeatures::enableFullscreen(false); |
81 | 84 |
82 if (command_line.HasSwitch(switches::kEnableEncryptedMedia)) | 85 if (command_line.HasSwitch(switches::kEnableEncryptedMedia)) |
83 WebRuntimeFeatures::enableEncryptedMedia(true); | 86 WebRuntimeFeatures::enableEncryptedMedia(true); |
(...skipping 26 matching lines...) Expand all Loading... |
110 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); | 113 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); |
111 | 114 |
112 if (command_line.HasSwitch(switches::kEnableSpeechSynthesis)) | 115 if (command_line.HasSwitch(switches::kEnableSpeechSynthesis)) |
113 WebRuntimeFeatures::enableSpeechSynthesis(true); | 116 WebRuntimeFeatures::enableSpeechSynthesis(true); |
114 | 117 |
115 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) | 118 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) |
116 WebRuntimeFeatures::enableWebGLDraftExtensions(true); | 119 WebRuntimeFeatures::enableWebGLDraftExtensions(true); |
117 } | 120 } |
118 | 121 |
119 } // namespace content | 122 } // namespace content |
OLD | NEW |