Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: content/child/runtime_features.cc

Issue 2339873002: Replace hide-scrollbars flag with a web setting. (Closed)
Patch Set: replace viewport test b/c overlay bars are hidden in layout tests. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698