Chromium Code Reviews| 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 99bbb200712c5a51ce67560d5435d39fbf51382c..fb2601b7983addd613c8d5203244ab7ff174c126 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)) { |
|
jamesr
2013/02/20 08:08:35
this code won't do what you want (it isn't actuall
David Trainor- moved to gerrit
2013/02/21 02:07:36
Ah yeah rebased and saw this. Moved the implement
|
| + 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; |