| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 bool enable_web_gl_image_chromium = | 143 bool enable_web_gl_image_chromium = |
| 144 command_line.HasSwitch(switches::kEnableWebGLImageChromium); | 144 command_line.HasSwitch(switches::kEnableWebGLImageChromium); |
| 145 #endif | 145 #endif |
| 146 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); | 146 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); |
| 147 | 147 |
| 148 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 148 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
| 149 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 149 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
| 150 | 150 |
| 151 if (ui::IsOverlayScrollbarEnabled()) | 151 if (ui::IsOverlayScrollbarEnabled()) |
| 152 WebRuntimeFeatures::enableOverlayScrollbars(true); | 152 WebRuntimeFeatures::enableOverlayScrollbars(true); |
| 153 if (ui::ShouldHideScrollbars()) |
| 154 WebRuntimeFeatures::enableHideScrollbars(true); |
| 153 | 155 |
| 154 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) | 156 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) |
| 155 WebRuntimeFeatures::enablePreciseMemoryInfo(true); | 157 WebRuntimeFeatures::enablePreciseMemoryInfo(true); |
| 156 | 158 |
| 157 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 159 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
| 158 command_line.HasSwitch( | 160 command_line.HasSwitch( |
| 159 switches::kEnableExperimentalWebPlatformFeatures)) { | 161 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 160 WebRuntimeFeatures::enableNetworkInformation(true); | 162 WebRuntimeFeatures::enableNetworkInformation(true); |
| 161 } | 163 } |
| 162 | 164 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 278 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 277 std::vector<std::string> disabled_features = base::SplitString( | 279 std::vector<std::string> disabled_features = base::SplitString( |
| 278 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 280 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 279 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 281 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 280 for (const std::string& feature : disabled_features) | 282 for (const std::string& feature : disabled_features) |
| 281 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 283 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 282 } | 284 } |
| 283 } | 285 } |
| 284 | 286 |
| 285 } // namespace content | 287 } // namespace content |
| OLD | NEW |