| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 304 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 307 std::vector<std::string> disabled_features = base::SplitString( | 305 std::vector<std::string> disabled_features = base::SplitString( |
| 308 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 306 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 309 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 307 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 310 for (const std::string& feature : disabled_features) | 308 for (const std::string& feature : disabled_features) |
| 311 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 309 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 312 } | 310 } |
| 313 } | 311 } |
| 314 | 312 |
| 315 } // namespace content | 313 } // namespace content |
| OLD | NEW |