| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 if (command_line.HasSwitch(switches::kDisableDeviceOrientation)) | 124 if (command_line.HasSwitch(switches::kDisableDeviceOrientation)) |
| 125 WebRuntimeFeatures::enableDeviceOrientation(false); | 125 WebRuntimeFeatures::enableDeviceOrientation(false); |
| 126 | 126 |
| 127 if (command_line.HasSwitch(switches::kDisableSpeechInput)) | 127 if (command_line.HasSwitch(switches::kDisableSpeechInput)) |
| 128 WebRuntimeFeatures::enableSpeechInput(false); | 128 WebRuntimeFeatures::enableSpeechInput(false); |
| 129 | 129 |
| 130 if (command_line.HasSwitch(switches::kDisableFileSystem)) | 130 if (command_line.HasSwitch(switches::kDisableFileSystem)) |
| 131 WebRuntimeFeatures::enableFileSystem(false); | 131 WebRuntimeFeatures::enableFileSystem(false); |
| 132 | 132 |
| 133 #if defined(OS_WIN) |
| 134 if (command_line.HasSwitch(switches::kEnableDirectWrite)) |
| 135 WebRuntimeFeatures::enableDirectWrite(true); |
| 136 #endif |
| 137 |
| 133 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) | 138 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) |
| 134 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); | 139 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); |
| 135 | 140 |
| 136 if (command_line.HasSwitch(switches::kEnableSpeechSynthesis)) | 141 if (command_line.HasSwitch(switches::kEnableSpeechSynthesis)) |
| 137 WebRuntimeFeatures::enableSpeechSynthesis(true); | 142 WebRuntimeFeatures::enableSpeechSynthesis(true); |
| 138 | 143 |
| 139 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) | 144 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) |
| 140 WebRuntimeFeatures::enableWebGLDraftExtensions(true); | 145 WebRuntimeFeatures::enableWebGLDraftExtensions(true); |
| 141 | 146 |
| 142 if (command_line.HasSwitch(switches::kEnableHTMLImports)) | 147 if (command_line.HasSwitch(switches::kEnableHTMLImports)) |
| 143 WebRuntimeFeatures::enableHTMLImports(true); | 148 WebRuntimeFeatures::enableHTMLImports(true); |
| 144 | 149 |
| 145 if (command_line.HasSwitch(switches::kEnableOverlayFullscreenVideo)) | 150 if (command_line.HasSwitch(switches::kEnableOverlayFullscreenVideo)) |
| 146 WebRuntimeFeatures::enableOverlayFullscreenVideo(true); | 151 WebRuntimeFeatures::enableOverlayFullscreenVideo(true); |
| 147 | 152 |
| 148 if (command_line.HasSwitch(switches::kEnableOverlayScrollbars)) | 153 if (command_line.HasSwitch(switches::kEnableOverlayScrollbars)) |
| 149 WebRuntimeFeatures::enableOverlayScrollbars(true); | 154 WebRuntimeFeatures::enableOverlayScrollbars(true); |
| 150 | 155 |
| 151 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) | 156 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) |
| 152 WebRuntimeFeatures::enableInputModeAttribute(true); | 157 WebRuntimeFeatures::enableInputModeAttribute(true); |
| 153 | 158 |
| 154 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) | 159 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) |
| 155 WebRuntimeFeatures::enableFastTextAutosizing(true); | 160 WebRuntimeFeatures::enableFastTextAutosizing(true); |
| 156 | 161 |
| 157 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) | 162 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) |
| 158 WebRuntimeFeatures::enableRepaintAfterLayout(true); | 163 WebRuntimeFeatures::enableRepaintAfterLayout(true); |
| 159 } | 164 } |
| 160 | 165 |
| 161 } // namespace content | 166 } // namespace content |
| OLD | NEW |