Chromium Code Reviews| Index: ui/aura_shell/shell.cc |
| diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc |
| index 358f29bd5248471531b2850f0da77a83cb39cb5f..a035a91e1874eff21f3d0f8cc6db79d9cb19e030 100644 |
| --- a/ui/aura_shell/shell.cc |
| +++ b/ui/aura_shell/shell.cc |
| @@ -5,6 +5,7 @@ |
| #include "ui/aura_shell/shell.h" |
| #include "base/bind.h" |
| +#include "ui/aura/aura_constants.h" |
| #include "ui/aura/desktop.h" |
| #include "ui/aura/screen_aura.h" |
| #include "ui/aura/toplevel_window_container.h" |
| @@ -84,6 +85,8 @@ Shell::Shell() |
| } |
| Shell::~Shell() { |
| + if (instance_ == this) |
|
oshima
2011/11/04 18:14:11
There should be only one Shell instance, so DCHECK
xiyuan
2011/11/04 18:39:31
Done.
|
| + instance_ = NULL; |
| } |
| // static |
| @@ -161,7 +164,10 @@ void Shell::AddChildToDefaultParent(aura::Window* window) { |
| switch (window->type()) { |
| case aura::WINDOW_TYPE_NORMAL: |
| case aura::WINDOW_TYPE_POPUP: |
| - parent = GetContainer(internal::kShellWindowId_DefaultContainer); |
| + if (!!window->GetProperty(aura::kAlwaysOnTopKey)) |
| + parent = GetContainer(internal::kShellWindowId_AlwaysOnTopContainer); |
| + else |
| + parent = GetContainer(internal::kShellWindowId_DefaultContainer); |
| break; |
| case aura::WINDOW_TYPE_MENU: |
| case aura::WINDOW_TYPE_TOOLTIP: |