| 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 810caf85d3f9994c820c1a4a18a2964f1108b4b8..f6ded7f92a95827499501a3e6f13e498b831f12f 100644
|
| --- a/mojo/services/view_manager/window_tree_host_impl.cc
|
| +++ b/mojo/services/view_manager/window_tree_host_impl.cc
|
| @@ -2,13 +2,12 @@
|
| // 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"
|
| #include "ui/aura/env.h"
|
| -#include "ui/aura/layout_manager.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/compositor/compositor.h"
|
| @@ -24,47 +23,6 @@
|
| // TODO(sky): nuke this. It shouldn't be static.
|
| // static
|
| ContextFactoryImpl* WindowTreeHostImpl::context_factory_ = NULL;
|
| -
|
| -////////////////////////////////////////////////////////////////////////////////
|
| -// RootLayoutManager, layout management for the root window's (one) child
|
| -
|
| -class RootLayoutManager : public aura::LayoutManager {
|
| - public:
|
| - RootLayoutManager() : child_(NULL) { }
|
| -
|
| - // Overridden from aura::LayoutManager
|
| - virtual void OnWindowResized() OVERRIDE;
|
| - virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
|
| - virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE {}
|
| - virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE {}
|
| - virtual void OnChildWindowVisibilityChanged(aura::Window* child,
|
| - bool visible) OVERRIDE {}
|
| - virtual void SetChildBounds(aura::Window* child,
|
| - const gfx::Rect& requested_bounds) OVERRIDE;
|
| - private:
|
| - aura::Window* child_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(RootLayoutManager);
|
| -};
|
| -
|
| -void RootLayoutManager::OnWindowResized() {
|
| - if (child_) {
|
| - gfx::Rect bounds = child_->parent()->bounds();
|
| - child_->SetBounds(gfx::Rect(0, 0, bounds.width(), bounds.height()));
|
| - }
|
| -}
|
| -
|
| -void RootLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
|
| - DCHECK(!child_);
|
| - child_ = child;
|
| -}
|
| -
|
| -void RootLayoutManager::SetChildBounds(aura::Window* child,
|
| - const gfx::Rect& requested_bounds) {
|
| - SetChildBoundsDirect(child, gfx::Rect(
|
| - requested_bounds.width(),
|
| - requested_bounds.height()));
|
| -}
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // WindowTreeHostImpl, public:
|
| @@ -90,8 +48,6 @@
|
| }
|
| context_factory_ = new ContextFactoryImpl(pipe.handle1.Pass());
|
| aura::Env::GetInstance()->set_context_factory(context_factory_);
|
| -
|
| - window()->SetLayoutManager(new RootLayoutManager());
|
| }
|
|
|
| WindowTreeHostImpl::~WindowTreeHostImpl() {
|
|
|