view-manager: Create the root-view only when the viewport-metrics are known.
commitd606481ea573a5d664e9a830d9287a2fc9388c58
authorsadrul <sadrul@chromium.org>
Wed, 15 Jul 2015 20:32:09 +0000 (15 13:32 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 15 Jul 2015 20:32:48 +0000 (15 20:32 +0000)
treee4d8ca27aa6902e6968d5fa67d9c1c518c927887
parente33eee90ef69dd15f31d5b9eb908e7ff17462dba
view-manager: Create the root-view only when the viewport-metrics are known.

Instead of creating the root-view at first, delay the creation until the viewport
metrics are known. This avoids having to create the root-view with a default size,
and then updating the size when the viewport metrics become known.

With this change, a Browser knows about the device-pixel ratio as soon as it is
embedded. So there's no more need for DevicePixelRatioWaiter. So that is also
removed.

BUG=496935

Review URL: https://codereview.chromium.org/1229893004

Cr-Commit-Position: refs/heads/master@{#338905}
13 files changed:
components/view_manager/display_manager.cc
components/view_manager/view_manager_app.cc
components/view_manager/view_manager_root_connection.cc
components/view_manager/view_manager_root_connection.h
components/view_manager/view_manager_root_delegate.h
components/view_manager/view_manager_root_impl.cc
components/view_manager/view_manager_service_unittest.cc
mandoline/ui/browser/browser.cc
mandoline/ui/browser/browser.h
mandoline/ui/browser/browser_apptest.cc
mandoline/ui/browser/browser_delegate.h
mandoline/ui/browser/browser_manager.cc
mandoline/ui/browser/browser_manager.h