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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) | 150 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) |
151 WebRuntimeFeatures::forceDisplayList2dCanvas(true); | 151 WebRuntimeFeatures::forceDisplayList2dCanvas(true); |
152 | 152 |
153 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) | 153 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) |
154 WebRuntimeFeatures::enableWebGLDraftExtensions(true); | 154 WebRuntimeFeatures::enableWebGLDraftExtensions(true); |
155 | 155 |
156 if (command_line.HasSwitch(switches::kEnableWebGLImageChromium)) | 156 if (command_line.HasSwitch(switches::kEnableWebGLImageChromium)) |
157 WebRuntimeFeatures::enableWebGLImageChromium(true); | 157 WebRuntimeFeatures::enableWebGLImageChromium(true); |
158 | 158 |
159 if (command_line.HasSwitch(switches::kEnableOverlayFullscreenVideo)) | 159 // TODO(watk): Remove EnableOverlayFullscreenVideo once blink is updated to |
160 WebRuntimeFeatures::enableOverlayFullscreenVideo(true); | 160 // use ForceOverlayFullscreenVideo instead. http://crbug.com/511376 |
| 161 if (command_line.HasSwitch(switches::kEnableOverlayFullscreenVideo) || |
| 162 command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) { |
| 163 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
| 164 } |
161 | 165 |
162 if (ui::IsOverlayScrollbarEnabled()) | 166 if (ui::IsOverlayScrollbarEnabled()) |
163 WebRuntimeFeatures::enableOverlayScrollbars(true); | 167 WebRuntimeFeatures::enableOverlayScrollbars(true); |
164 | 168 |
165 if (command_line.HasSwitch(switches::kEnableBleedingEdgeRenderingFastPaths)) | 169 if (command_line.HasSwitch(switches::kEnableBleedingEdgeRenderingFastPaths)) |
166 WebRuntimeFeatures::enableBleedingEdgeFastPaths(true); | 170 WebRuntimeFeatures::enableBleedingEdgeFastPaths(true); |
167 | 171 |
168 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) | 172 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) |
169 WebRuntimeFeatures::enablePreciseMemoryInfo(true); | 173 WebRuntimeFeatures::enablePreciseMemoryInfo(true); |
170 | 174 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 226 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
223 std::vector<std::string> disabled_features = base::SplitString( | 227 std::vector<std::string> disabled_features = base::SplitString( |
224 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 228 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
225 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 229 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
226 for (const std::string& feature : disabled_features) | 230 for (const std::string& feature : disabled_features) |
227 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 231 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
228 } | 232 } |
229 } | 233 } |
230 | 234 |
231 } // namespace content | 235 } // namespace content |
OLD | NEW |