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; |