summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 20:32:53 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 20:32:53 +0000
commit151a212becb52428c3932cfb0928c35599466b86 (patch)
tree487992dcfeab76f82c4c5ce85a10552522519c4b
parentf7d9ce25eb53f1211799de746a072639759ad4ec (diff)
downloadchromium_src-151a212becb52428c3932cfb0928c35599466b86.zip
chromium_src-151a212becb52428c3932cfb0928c35599466b86.tar.gz
chromium_src-151a212becb52428c3932cfb0928c35599466b86.tar.bz2
Revert r106508 "LayoutManager controls child bounds."
Added SetChildBounds and several listener methods to LayoutManager class. They will be used to implement more sophisticated behavior." This reverts commit 5d72aa923ebd1068319b67a1dbaa163a324c4b45. TBR=sadrul@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/8360009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106565 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/aura/aura.gyp37
-rw-r--r--ui/aura/layout_manager.cc22
-rw-r--r--ui/aura/layout_manager.h32
-rw-r--r--ui/aura/test/aura_test_base.h3
-rw-r--r--ui/aura/test/event_generator.h3
-rw-r--r--ui/aura/test/test_desktop_delegate.h3
-rw-r--r--ui/aura/window.cc14
-rw-r--r--ui/aura/window.h6
-rw-r--r--ui/aura_shell/aura_shell.gyp6
-rw-r--r--ui/aura_shell/default_container_layout_manager.cc67
-rw-r--r--ui/aura_shell/default_container_layout_manager.h48
-rw-r--r--ui/aura_shell/default_container_layout_manager_unittest.cc83
-rw-r--r--ui/aura_shell/desktop_layout_manager.cc15
-rw-r--r--ui/aura_shell/desktop_layout_manager.h9
-rw-r--r--ui/aura_shell/shell.cc9
15 files changed, 20 insertions, 337 deletions
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index e246511..828227b 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -37,7 +37,6 @@
'event_filter.h',
'focus_manager.h',
'hit_test.h',
- 'layout_manager.cc',
'layout_manager.h',
'screen_aura.cc',
'screen_aura.h',
@@ -53,31 +52,6 @@
],
},
{
- 'target_name': 'test_support_aura',
- 'type': 'static_library',
- 'dependencies': [
- '../../skia/skia.gyp:skia',
- '../../testing/gtest.gyp:gtest',
- '../ui.gyp:ui',
- 'aura',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'test/aura_test_base.cc',
- 'test/aura_test_base.h',
- 'test/event_generator.cc',
- 'test/event_generator.h',
- 'test/test_desktop_delegate.cc',
- 'test/test_desktop_delegate.h',
- '../gfx/compositor/test_compositor.cc',
- '../gfx/compositor/test_compositor.h',
- '../gfx/compositor/test_texture.cc',
- '../gfx/compositor/test_texture.h',
- ],
- },
- {
'target_name': 'aura_demo',
'type': 'executable',
'dependencies': [
@@ -113,20 +87,29 @@
'../ui.gyp:gfx_resources',
'../ui.gyp:ui',
'../ui.gyp:ui_resources',
- 'test_support_aura',
'aura',
],
'include_dirs': [
'..',
],
'sources': [
+ 'test/aura_test_base.cc',
+ 'test/aura_test_base.h',
+ 'test/event_generator.cc',
+ 'test/event_generator.h',
'test/run_all_unittests.cc',
+ 'test/test_desktop_delegate.cc',
+ 'test/test_desktop_delegate.h',
'test/test_suite.cc',
'test/test_suite.h',
'test/test_window_delegate.cc',
'test/test_window_delegate.h',
'toplevel_window_event_filter_unittest.cc',
'window_unittest.cc',
+ '../gfx/compositor/test_compositor.cc',
+ '../gfx/compositor/test_compositor.h',
+ '../gfx/compositor/test_texture.cc',
+ '../gfx/compositor/test_texture.h',
'<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc',
],
diff --git a/ui/aura/layout_manager.cc b/ui/aura/layout_manager.cc
deleted file mode 100644
index 4780ae0..0000000
--- a/ui/aura/layout_manager.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/aura/layout_manager.h"
-
-#include "ui/aura/window.h"
-
-namespace aura {
-
-LayoutManager::LayoutManager() {
-}
-
-LayoutManager::~LayoutManager() {
-}
-
-void LayoutManager::SetChildBounds(aura::Window* child,
- const gfx::Rect& bounds) {
- child->SetBoundsInternal(bounds);
-}
-
-} // namespace aura
diff --git a/ui/aura/layout_manager.h b/ui/aura/layout_manager.h
index 5ff905b..be4e856 100644
--- a/ui/aura/layout_manager.h
+++ b/ui/aura/layout_manager.h
@@ -6,45 +6,17 @@
#define UI_AURA_LAYOUT_MANAGER_H_
#pragma once
-#include "base/basictypes.h"
#include "ui/aura/aura_export.h"
-namespace gfx {
-class Rect;
-}
-
namespace aura {
-class Window;
// An interface implemented by an object that places child windows.
class AURA_EXPORT LayoutManager {
public:
- LayoutManager();
- virtual ~LayoutManager();
+ virtual ~LayoutManager() {}
- // Invoked when the window is resized.
+ // Called when the window is resized.
virtual void OnWindowResized() = 0;
-
- // Invoked when the window |child| has been added.
- virtual void OnWindowAdded(Window* child) = 0;
-
- // Invoked prior to removing |window|.
- virtual void OnWillRemoveWindow(Window* child) = 0;
-
- // Invoked when the |SetVisible()| is invoked on the window |child|.
- // |visible| is the value supplied to |SetVisible()|. If |visible| is true,
- // window->IsVisible() may still return false. See description in
- // Window::IsVisible() for details.
- virtual void OnChildWindowVisibilityChanged(Window* child, bool visibile) = 0;
-
- // Calculates the bounds for the |child| based on |requsted_bounds|.
- virtual void CalculateBoundsForChild(Window* child,
- gfx::Rect* requested_bounds) = 0;
- protected:
- // Sets the child's bounds forcibly. LayoutManager is responsible
- // for checking the state and make sure the bounds are correctly
- // adjusted.
- void SetChildBounds(aura::Window* child, const gfx::Rect& bounds);
};
} // namespace aura
diff --git a/ui/aura/test/aura_test_base.h b/ui/aura/test/aura_test_base.h
index 1d2551a..4aafa0f 100644
--- a/ui/aura/test/aura_test_base.h
+++ b/ui/aura/test/aura_test_base.h
@@ -6,7 +6,6 @@
#define UI_AURA_TEST_AURA_TEST_BASE_H_
#pragma once
-#include "ui/aura/aura_export.h"
#include "base/compiler_specific.h"
#include "base/basictypes.h"
#include "base/message_loop.h"
@@ -16,7 +15,7 @@ namespace aura {
namespace test {
// A base class for aura unit tests.
-class AURA_EXPORT AuraTestBase : public testing::Test {
+class AuraTestBase : public testing::Test {
public:
AuraTestBase();
virtual ~AuraTestBase();
diff --git a/ui/aura/test/event_generator.h b/ui/aura/test/event_generator.h
index 2f1b222..afafd4e 100644
--- a/ui/aura/test/event_generator.h
+++ b/ui/aura/test/event_generator.h
@@ -6,7 +6,6 @@
#define UI_AURA_TEST_EVENT_GENERATOR_H_
#pragma once
-#include "ui/aura/aura_export.h"
#include "base/basictypes.h"
#include "ui/gfx/point.h"
@@ -18,7 +17,7 @@ namespace test {
// EventGenerator is a tool that generates and dispatch events.
// TODO(oshima): Support key events.
-class AURA_EXPORT EventGenerator {
+class EventGenerator {
public:
// Creates an EventGenerator with the mouse location (0,0).
EventGenerator();
diff --git a/ui/aura/test/test_desktop_delegate.h b/ui/aura/test/test_desktop_delegate.h
index 2be7fe9..09bfc31e 100644
--- a/ui/aura/test/test_desktop_delegate.h
+++ b/ui/aura/test/test_desktop_delegate.h
@@ -6,7 +6,6 @@
#define UI_AURA_TEST_TEST_DESKTOP_DELEGATE_H_
#pragma once
-#include "ui/aura/aura_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -18,7 +17,7 @@ class ToplevelWindowContainer;
namespace test {
-class AURA_EXPORT TestDesktopDelegate : public DesktopDelegate {
+class TestDesktopDelegate : public DesktopDelegate {
public:
// Callers should allocate a TestDesktopDelegate on the heap and then forget
// about it -- the c'tor passes ownership of the TestDesktopDelegate to the
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 478c318c..e3945e1 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -136,16 +136,12 @@ void Window::SetLayoutManager(LayoutManager* layout_manager) {
}
void Window::SetBounds(const gfx::Rect& new_bounds) {
- gfx::Rect adjusted_bounds = new_bounds;
- if (parent_ && parent_->layout_manager())
- parent_->layout_manager()->CalculateBoundsForChild(this, &adjusted_bounds);
-
if (show_state_ == ui::SHOW_STATE_MAXIMIZED ||
show_state_ == ui::SHOW_STATE_FULLSCREEN) {
- restore_bounds_ = adjusted_bounds;
+ restore_bounds_ = new_bounds;
return;
}
- SetBoundsInternal(adjusted_bounds);
+ SetBoundsInternal(new_bounds);
}
gfx::Rect Window::GetTargetBounds() const {
@@ -202,16 +198,12 @@ void Window::AddChild(Window* child) {
child->parent_ = this;
layer_->Add(child->layer_.get());
children_.push_back(child);
- if (layout_manager_.get())
- layout_manager_->OnWindowAdded(child);
FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowAdded(child));
}
void Window::RemoveChild(Window* child) {
Windows::iterator i = std::find(children_.begin(), children_.end(), child);
DCHECK(i != children_.end());
- if (layout_manager_.get())
- layout_manager_->OnWillRemoveWindow(child);
FOR_EACH_OBSERVER(WindowObserver, observers_, OnWillRemoveWindow(child));
child->parent_ = NULL;
layer_->Remove(child->layer_.get());
@@ -430,8 +422,6 @@ void Window::SetVisible(bool visible) {
if (delegate_)
delegate_->OnWindowVisibilityChanged(is_visible);
}
- if (parent_ && parent_->layout_manager_.get())
- parent_->layout_manager_->OnChildWindowVisibilityChanged(this, visible);
FOR_EACH_OBSERVER(WindowObserver, observers_,
OnWindowVisibilityChanged(this, visible));
}
diff --git a/ui/aura/window.h b/ui/aura/window.h
index d510975..a2b9617 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -118,10 +118,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Assigns a LayoutManager to size and place child windows.
// The Window takes ownership of the LayoutManager.
void SetLayoutManager(LayoutManager* layout_manager);
- LayoutManager* layout_manager() { return layout_manager_.get(); }
- // Changes the bounds of the window. If present, the window's parent's
- // LayoutManager may adjust the bounds.
+ // Changes the bounds of the window.
void SetBounds(const gfx::Rect& new_bounds);
// Returns the target bounds of the window. If the window's layer is
@@ -255,8 +253,6 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
virtual Desktop* GetDesktop();
private:
- friend class LayoutManager;
-
// Changes the bounds of the window without condition.
void SetBoundsInternal(const gfx::Rect& new_bounds);
diff --git a/ui/aura_shell/aura_shell.gyp b/ui/aura_shell/aura_shell.gyp
index 429ae06..637534b 100644
--- a/ui/aura_shell/aura_shell.gyp
+++ b/ui/aura_shell/aura_shell.gyp
@@ -33,8 +33,6 @@
],
'sources': [
# All .cc, .h under views, except unittests
- 'default_container_layout_manager.cc',
- 'default_container_layout_manager.h',
'desktop_background_view.cc',
'desktop_background_view.h',
'desktop_layout_manager.cc',
@@ -75,17 +73,13 @@
'../../third_party/icu/icu.gyp:icuuc',
'../../views/views.gyp:views',
'../gfx/compositor/compositor.gyp:compositor',
- '../gfx/gl/gl.gyp:gl',
'../ui.gyp:gfx_resources',
'../ui.gyp:ui',
'../ui.gyp:ui_resources',
'../ui.gyp:ui_resources_standard',
- '../aura/aura.gyp:aura',
- '../aura/aura.gyp:test_support_aura',
'aura_shell',
],
'sources': [
- 'default_container_layout_manager_unittest.cc',
'launcher/launcher_model_unittest.cc',
'launcher/view_model_unittest.cc',
'run_all_unittests.cc',
diff --git a/ui/aura_shell/default_container_layout_manager.cc b/ui/aura_shell/default_container_layout_manager.cc
deleted file mode 100644
index d3c23c3..0000000
--- a/ui/aura_shell/default_container_layout_manager.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/aura_shell/default_container_layout_manager.h"
-
-#include "ui/aura/desktop.h"
-#include "ui/aura/window.h"
-#include "ui/aura/screen_aura.h"
-#include "ui/aura/window_types.h"
-#include "ui/gfx/rect.h"
-
-namespace aura_shell {
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// DefaultContainerLayoutManager, public:
-
-DefaultContainerLayoutManager::DefaultContainerLayoutManager(
- aura::Window* owner)
- : owner_(owner) {
-}
-
-DefaultContainerLayoutManager::~DefaultContainerLayoutManager() {}
-
-////////////////////////////////////////////////////////////////////////////////
-// DefaultContainerLayoutManager, aura::LayoutManager implementation:
-
-void DefaultContainerLayoutManager::OnWindowResized() {
- aura::Window::Windows::const_iterator i = owner_->children().begin();
- // Use SetBounds because window may be maximized or fullscreen.
- for (; i != owner_->children().end(); ++i)
- (*i)->SetBounds((*i)->bounds());
- NOTIMPLEMENTED();
-}
-
-void DefaultContainerLayoutManager::OnWindowAdded(aura::Window* child) {
- child->SetBounds(child->bounds());
- NOTIMPLEMENTED();
-}
-
-void DefaultContainerLayoutManager::OnWillRemoveWindow(aura::Window* child) {
- NOTIMPLEMENTED();
-}
-
-void DefaultContainerLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* window, bool visibile) {
- NOTIMPLEMENTED();
-}
-
-void DefaultContainerLayoutManager::CalculateBoundsForChild(
- aura::Window* child, gfx::Rect* requested_bounds) {
- if (child->type() != aura::kWindowType_Toplevel)
- return;
- // TODO(oshima): Figure out bounds for default windows.
- gfx::Rect viewport_bounds = owner_->bounds();
-
- // A window can still be placed outside of the screen.
- requested_bounds->SetRect(
- requested_bounds->x(),
- viewport_bounds.y(),
- std::min(requested_bounds->width(), viewport_bounds.width()),
- std::min(requested_bounds->height(), viewport_bounds.height()));
-}
-
-} // namespace internal
-} // namespace aura_shell
diff --git a/ui/aura_shell/default_container_layout_manager.h b/ui/aura_shell/default_container_layout_manager.h
deleted file mode 100644
index 3ea8946..0000000
--- a/ui/aura_shell/default_container_layout_manager.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_
-#define UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_
-#pragma once
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/layout_manager.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Rect;
-}
-
-namespace aura_shell {
-namespace internal {
-
-// LayoutManager for the default window container.
-class DefaultContainerLayoutManager : public aura::LayoutManager {
- public:
- explicit DefaultContainerLayoutManager(aura::Window* owner);
- virtual ~DefaultContainerLayoutManager();
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAdded(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) OVERRIDE;
- virtual void CalculateBoundsForChild(aura::Window* child,
- gfx::Rect* requested_bounds) OVERRIDE;
-
- private:
- aura::Window* owner_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultContainerLayoutManager);
-};
-
-} // namespace internal
-} // namespace aura_shell
-
-#endif // UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_
diff --git a/ui/aura_shell/default_container_layout_manager_unittest.cc b/ui/aura_shell/default_container_layout_manager_unittest.cc
deleted file mode 100644
index 9eef80e..0000000
--- a/ui/aura_shell/default_container_layout_manager_unittest.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/aura_shell/default_container_layout_manager.h"
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/desktop.h"
-#include "ui/aura/screen_aura.h"
-#include "ui/aura/window.h"
-
-namespace aura_shell {
-namespace test {
-
-namespace {
-
-class DefaultContainerLayoutManagerTest : public aura::test::AuraTestBase {
- public:
- DefaultContainerLayoutManagerTest() {}
- virtual ~DefaultContainerLayoutManagerTest() {}
-
- virtual void SetUp() OVERRIDE {
- aura::test::AuraTestBase::SetUp();
- aura::Desktop* desktop = aura::Desktop::GetInstance();
- container_.reset(
- CreateTestWindow(gfx::Rect(0, 0, 500, 400), desktop));
- // draggable area is 0,0 500x400.
- container_->SetLayoutManager(
- new aura_shell::internal::DefaultContainerLayoutManager(
- container_.get()));
- }
-
- aura::Window* CreateTestWindow(const gfx::Rect& bounds,
- aura::Window* parent) {
- aura::Window* window = new aura::Window(NULL);
- window->Init();
- window->SetBounds(bounds);
- window->Show();
- window->SetParent(parent);
- return window;
- }
-
- aura::Window* container() { return container_.get(); }
-
- private:
- scoped_ptr<aura::Window> container_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultContainerLayoutManagerTest);
-};
-
-} // namespace
-
-TEST_F(DefaultContainerLayoutManagerTest, SetBounds) {
- // Layout Manager moves the window to (0,0) to fit to draggable area.
- scoped_ptr<aura::Window> child(
- CreateTestWindow(gfx::Rect(0, -1000, 100, 100), container()));
- EXPECT_EQ("0,0 100x100", child->bounds().ToString());
-
- // DCLM enforces the window height can't be taller than its owner's height.
- child->SetBounds(gfx::Rect(0, 0, 100, 500));
- EXPECT_EQ("0,0 100x400", child->bounds().ToString());
-
- // DCLM enforces the window width can't be wider than its owner's width.
- child->SetBounds(gfx::Rect(0, 0, 900, 500));
- EXPECT_EQ("0,0 500x400", child->bounds().ToString());
-
- // Y origin must always be the top of drag area.
- child->SetBounds(gfx::Rect(0, 500, 900, 500));
- EXPECT_EQ("0,0 500x400", child->bounds().ToString());
- child->SetBounds(gfx::Rect(0, -500, 900, 500));
- EXPECT_EQ("0,0 500x400", child->bounds().ToString());
-
- // X origin can be anywhere.
- child->SetBounds(gfx::Rect(-100, 500, 900, 500));
- EXPECT_EQ("-100,0 500x400", child->bounds().ToString());
- child->SetBounds(gfx::Rect(1000, 500, 900, 500));
- EXPECT_EQ("1000,0 500x400", child->bounds().ToString());
-}
-
-} // namespace test
-} // namespace aura_shell
diff --git a/ui/aura_shell/desktop_layout_manager.cc b/ui/aura_shell/desktop_layout_manager.cc
index ce14ae0..8e0dc0f 100644
--- a/ui/aura_shell/desktop_layout_manager.cc
+++ b/ui/aura_shell/desktop_layout_manager.cc
@@ -50,20 +50,5 @@ void DesktopLayoutManager::OnWindowResized() {
status_area_bounds.height()));
}
-void DesktopLayoutManager::OnWindowAdded(aura::Window* child) {
-}
-
-void DesktopLayoutManager::OnWillRemoveWindow(aura::Window* child) {
-}
-
-void DesktopLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) {
-}
-
-void DesktopLayoutManager::CalculateBoundsForChild(
- aura::Window* child, gfx::Rect* requested_bounds) {
-}
-
-
} // namespace internal
} // namespace aura_shell
diff --git a/ui/aura_shell/desktop_layout_manager.h b/ui/aura_shell/desktop_layout_manager.h
index 5d58a71..28e1f02 100644
--- a/ui/aura_shell/desktop_layout_manager.h
+++ b/ui/aura_shell/desktop_layout_manager.h
@@ -13,9 +13,6 @@
namespace aura {
class Window;
}
-namespace gfx {
-class Rect;
-}
namespace views {
class Widget;
}
@@ -45,12 +42,6 @@ class DesktopLayoutManager : public aura::LayoutManager {
private:
// Overridden from aura::LayoutManager:
virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAdded(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) OVERRIDE;
- virtual void CalculateBoundsForChild(aura::Window* child,
- gfx::Rect* requested_bounds) OVERRIDE;
aura::Window* owner_;
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index 115cb56..a44d5eb 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -10,7 +10,6 @@
#include "ui/aura/toplevel_window_container.h"
#include "ui/aura/window.h"
#include "ui/aura/window_types.h"
-#include "ui/aura_shell/default_container_layout_manager.h"
#include "ui/aura_shell/desktop_layout_manager.h"
#include "ui/aura_shell/launcher/launcher.h"
#include "ui/aura_shell/shell_delegate.h"
@@ -34,8 +33,6 @@ void CreateSpecialContainers(aura::Window::Windows* containers) {
aura::Window* default_container = new aura::ToplevelWindowContainer;
default_container->set_id(internal::kShellWindowId_DefaultContainer);
- default_container->SetLayoutManager(
- new internal::DefaultContainerLayoutManager(default_container));
containers->push_back(default_container);
aura::Window* always_on_top_container = new aura::ToplevelWindowContainer;
@@ -161,10 +158,8 @@ void Shell::Init() {
AsToplevelWindowContainer();
launcher_.reset(new Launcher(toplevel_container));
desktop_layout->set_launcher_widget(launcher_->widget());
- views::Widget* status_area_widget = internal::CreateStatusArea();
- desktop_layout->set_status_area_widget(status_area_widget);
- aura::ScreenAura* screen = aura::Desktop::GetInstance()->screen();
- screen->set_work_area_insets(
+ desktop_layout->set_status_area_widget(internal::CreateStatusArea());
+ aura::Desktop::GetInstance()->screen()->set_work_area_insets(
gfx::Insets(0, 0, launcher_->widget()->GetWindowScreenBounds().height(),
0));
}