Chromium Code Reviews| Index: ui/aura_shell/shell.cc |
| diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc |
| index b2a3a98651b4f957f69c7871265161626fa26ff9..f540ac2117da89b75852d0de43c483deb3e6b7ca 100644 |
| --- a/ui/aura_shell/shell.cc |
| +++ b/ui/aura_shell/shell.cc |
| @@ -11,6 +11,7 @@ |
| #include "ui/aura/toplevel_window_container.h" |
| #include "ui/aura/window.h" |
| #include "ui/aura/window_types.h" |
| +#include "ui/aura_shell/always_on_top_controller.h" |
| #include "ui/aura_shell/default_container_event_filter.h" |
| #include "ui/aura_shell/default_container_layout_manager.h" |
| #include "ui/aura_shell/desktop_layout_manager.h" |
| @@ -82,6 +83,8 @@ Shell::Shell() |
| } |
| Shell::~Shell() { |
| + DCHECK(instance_ == this); |
| + instance_ = NULL; |
| } |
| // static |
| @@ -106,6 +109,11 @@ void Shell::Init() { |
| (*i)->Show(); |
| } |
| + always_on_top_controller_.reset(new internal::AlwaysOnTopController); |
| + always_on_top_controller_->SetContainers( |
| + GetContainer(internal::kShellWindowId_DefaultContainer), |
|
Ben Goodger (Google)
2011/11/09 17:18:09
nit: 4-space indent
xiyuan
2011/11/09 17:42:18
Done.
|
| + GetContainer(internal::kShellWindowId_AlwaysOnTopContainer)); |
| + |
| internal::DesktopLayoutManager* desktop_layout = |
| new internal::DesktopLayoutManager(desktop_window); |
| desktop_window->SetLayoutManager(desktop_layout); |
| @@ -175,7 +183,7 @@ void Shell::AddChildToDefaultParent(aura::Window* window) { |
| switch (window->type()) { |
| case aura::WINDOW_TYPE_NORMAL: |
| case aura::WINDOW_TYPE_POPUP: |
| - parent = GetContainer(internal::kShellWindowId_DefaultContainer); |
| + parent = always_on_top_controller_->GetContainer(window); |
| break; |
| case aura::WINDOW_TYPE_MENU: |
| case aura::WINDOW_TYPE_TOOLTIP: |