Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: ui/aura_shell/shell.cc

Issue 8387043: [Aura] Support always-on-top top level window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura bot Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698