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

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: sync and address oshima's comments in patch 6 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 705e0ac1d05dda05822de7bf9a8fce4be8742ef5..56a5339de80f2bdb36c883327f0bac61450efaea 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "ui/aura/aura_constants.h"
#include "ui/aura/aura_switches.h"
#include "ui/aura/desktop.h"
#include "ui/aura/screen_aura.h"
@@ -82,6 +83,8 @@ Shell::Shell()
}
Shell::~Shell() {
+ DCHECK(instance_ == this);
+ instance_ = NULL;
}
// static
@@ -172,7 +175,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