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

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: Address test naming nit 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/common/CommandLine.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/public/android/java/src/org/chromium/content/common/CommandLine.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698