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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 12210050: Expose FS show/hide thresholds to Command Line (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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: content/renderer/gpu/render_widget_compositor.cc
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 619944058745584281693ddead3001f48580e381..85bd2f7e5ad5c1612df2acc6e87cc608454000ba 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -121,6 +121,24 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
settings.calculateTopControlsPosition = false;
}
+ if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) {
+ std::string top_threshold_str =
+ cmd->GetSwitchValueASCII(cc::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 (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) {
+ std::string top_threshold_str =
+ cmd->GetSwitchValueASCII(cc::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;
+ }
+
settings.partialSwapEnabled =
cmd->HasSwitch(cc::switches::kEnablePartialSwap);
settings.backgroundColorInsteadOfCheckerboard =
« 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