Make it possible to change the viewport size

This makes it possible to change the viewport size
which mojo is using.  The sky debugger uses this new
API to set the viewport to something closer to mobile
instead of 800x600 ancient desktop size. :)

Still the (800, 600) constant is prevelant throughout
mojo (just search for it) and mojo does not seem to
fully update when the viewport size changes, so we actually
only see 320x600 pixels instead of 320x640 in
sky debugger after this change.

Mostly this change is about validating that this is the
correct way to plumb this information.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/692693002
This commit is contained in:
Eric Seidel
2014-10-30 14:20:45 -07:00
parent dc0521fb43
commit b0120fd284

View File

@@ -65,6 +65,8 @@ class SkyDebugger : public mojo::ApplicationDelegate,
root_ = root;
root_->AddObserver(this);
window_manager_app_->SetViewportSize(gfx::Size(320, 640));
content_ = mojo::View::Create(view_manager_);
content_->SetBounds(root_->bounds());
root_->AddChild(content_);