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/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool enable_web_gl_image_chromium = | 152 bool enable_web_gl_image_chromium = |
153 command_line.HasSwitch(switches::kEnableWebGLImageChromium); | 153 command_line.HasSwitch(switches::kEnableWebGLImageChromium); |
154 #endif | 154 #endif |
155 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); | 155 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); |
156 | 156 |
157 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 157 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
158 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 158 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
159 | 159 |
160 if (ui::IsOverlayScrollbarEnabled()) | 160 if (ui::IsOverlayScrollbarEnabled()) |
161 WebRuntimeFeatures::enableOverlayScrollbars(true); | 161 WebRuntimeFeatures::enableOverlayScrollbars(true); |
162 if (ui::ShouldHideScrollbars()) | |
163 WebRuntimeFeatures::enableHideScrollbars(true); | |
164 | 162 |
165 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) | 163 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) |
166 WebRuntimeFeatures::enablePreciseMemoryInfo(true); | 164 WebRuntimeFeatures::enablePreciseMemoryInfo(true); |
167 | 165 |
168 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 166 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
169 command_line.HasSwitch( | 167 command_line.HasSwitch( |
170 switches::kEnableExperimentalWebPlatformFeatures)) { | 168 switches::kEnableExperimentalWebPlatformFeatures)) { |
171 WebRuntimeFeatures::enableNetworkInformation(true); | 169 WebRuntimeFeatures::enableNetworkInformation(true); |
172 } | 170 } |
173 | 171 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 312 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
315 std::vector<std::string> disabled_features = base::SplitString( | 313 std::vector<std::string> disabled_features = base::SplitString( |
316 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 314 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
317 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 315 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
318 for (const std::string& feature : disabled_features) | 316 for (const std::string& feature : disabled_features) |
319 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 317 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
320 } | 318 } |
321 } | 319 } |
322 | 320 |
323 } // namespace content | 321 } // namespace content |
OLD | NEW |