Normalize top controls offset to (0, 1), Chromium-side.
Since top controls height can now be changed, storing top controls
offset as an absolute value causes problems. Normalizing its format to
(0, 1) means we we don't need to adjust it when the height changes. It
also improves readability and means TopControlsManager will compute
correctly even when the height is currently 0.
This patch also switches top controls to use SyncedProperty.
See also Blink-side patch: https://codereview.chromium.org/882683003
BUG=430635
Review URL: https://codereview.chromium.org/901813002
Cr-Commit-Position: refs/heads/master@{#315216}
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index 9428ef84..25d9f53 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -129,6 +129,9 @@
virtual void setShowDebugBorders(bool show);
virtual void setContinuousPaintingEnabled(bool enabled);
virtual void setShowScrollBottleneckRects(bool show);
+ virtual void setTopControlsShownRatio(float);
+
+ // TODO(aelias): Delete after Blink roll
virtual void setTopControlsContentOffset(float);
// cc::LayerTreeHostClient implementation.