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

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 12210050: Expose FS show/hide thresholds to Command Line (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: webkit/compositor_bindings/web_layer_tree_view_impl.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.cc b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
index f8e8d54ded61dfbd165686219a45d78347710f25..ed21705ab7ff93a48e989c161b53b033dcdbb77e 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -64,6 +64,23 @@ bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSetti
if (base::StringToDouble(controls_height_str, &controls_height) && controls_height > 0)
settings.topControlsHeight = controls_height;
}
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsShowThreshold)) {
+ std::string top_threshold_str(
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTopControlsShowThreshold));
+ double show_threshold;
+ if (base::StringToDouble(top_threshold_str, &show_threshold) && show_threshold >= 0.f && show_threshold <= 1.f)
+ settings.topControlsShowThreshold = show_threshold;
+ }
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsHideThreshold)) {
+ std::string top_threshold_str(
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTopControlsHideThreshold));
+ double hide_threshold;
+ if (base::StringToDouble(top_threshold_str, &hide_threshold) && hide_threshold >= 0.f && hide_threshold <= 1.f)
+ settings.topControlsHideThreshold = hide_threshold;
+ }
+
if (settings.calculateTopControlsPosition && (settings.topControlsHeight <= 0 || !settings.compositorFrameMessage)) {
DCHECK(false) << "Top controls repositioning enabled without valid height or compositorFrameMessage set.";
settings.calculateTopControlsPosition = false;

Powered by Google App Engine
This is Rietveld 408576698