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

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 10 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
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/shell_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698