| Index: mojo/services/view_manager/window_tree_host_impl.cc
|
| diff --git a/mojo/services/view_manager/window_tree_host_impl.cc b/mojo/services/view_manager/window_tree_host_impl.cc
|
| index b82da1df71c7b3ac60218a35a4118bf412d6df75..7dd8696a98dc209721b280049543949d7b43bea1 100644
|
| --- a/mojo/services/view_manager/window_tree_host_impl.cc
|
| +++ b/mojo/services/view_manager/window_tree_host_impl.cc
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "mojo/services/view_manager/root_node_manager.h"
|
| #include "mojo/services/view_manager/window_tree_host_impl.h"
|
| -
|
| #include "mojo/public/c/gles2/gles2.h"
|
| #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
|
| #include "mojo/services/view_manager/context_factory_impl.h"
|
| @@ -30,10 +30,12 @@ ContextFactoryImpl* WindowTreeHostImpl::context_factory_ = NULL;
|
| WindowTreeHostImpl::WindowTreeHostImpl(
|
| NativeViewportPtr viewport,
|
| const gfx::Rect& bounds,
|
| + RootNodeManager* root_node_manager,
|
| const base::Callback<void()>& compositor_created_callback)
|
| : native_viewport_(viewport.Pass()),
|
| compositor_created_callback_(compositor_created_callback),
|
| - bounds_(bounds) {
|
| + bounds_(bounds),
|
| + root_node_manager_(root_node_manager) {
|
| native_viewport_.set_client(this);
|
| native_viewport_->Create(Rect::From(bounds));
|
|
|
| @@ -137,6 +139,11 @@ void WindowTreeHostImpl::OnCreated() {
|
| void WindowTreeHostImpl::OnBoundsChanged(RectPtr bounds) {
|
| bounds_ = bounds.To<gfx::Rect>();
|
| OnHostResized(bounds_.size());
|
| +
|
| + Node* root_node = root_node_manager_->root();
|
| + if (bounds_ == root_node->bounds())
|
| + return;
|
| + root_node->window()->SetBounds(bounds_);
|
| }
|
|
|
| void WindowTreeHostImpl::OnDestroyed() {
|
|
|