Plumb ViewportMetrics change notifications around the world and back.
This fixes the race which is seen where mojo_shell will sometimes
launch with the wrong viewport metrics since the DisplayManager
will happily respond to GetViewportMetrics with default values
before the NativeViewport has fully booted and told it what the
actual values are.
I considered making DisplayManager hang until the NativeViewport
was ready, but I decided that it does make sense for the
ViewportMetrics (device pixel ratio, mostly) to change for a
view if it were to move between displays (as exists on desktop
OSes today).
R=abarth@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/880743002
diff --git a/services/view_manager/view_manager_service_impl.h b/services/view_manager/view_manager_service_impl.h
index 2d91436..b6ce0a2 100644
--- a/services/view_manager/view_manager_service_impl.h
+++ b/services/view_manager/view_manager_service_impl.h
@@ -91,6 +91,9 @@
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds,
bool originated_change);
+ void ProcessViewportMetricsChanged(const mojo::ViewportMetrics& old_metrics,
+ const mojo::ViewportMetrics& new_metrics,
+ bool originated_change);
void ProcessWillChangeViewHierarchy(const ServerView* view,
const ServerView* new_parent,
const ServerView* old_parent,