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

Unified Diff: ui/aura_shell/stacking_controller.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 update comment per ben 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/stacking_controller.h ('k') | ui/aura_shell/stacking_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/stacking_controller.cc
diff --git a/ui/aura_shell/stacking_controller.cc b/ui/aura_shell/stacking_controller.cc
index 2fb3ec6297905b1413db04e51024da3fa8fb6ab0..3a913c3ee996d1a8fa09334b058cb971787c90d2 100644
--- a/ui/aura_shell/stacking_controller.cc
+++ b/ui/aura_shell/stacking_controller.cc
@@ -6,6 +6,7 @@
#include "ui/aura/desktop.h"
#include "ui/aura/window.h"
+#include "ui/aura_shell/always_on_top_controller.h"
#include "ui/aura_shell/shell.h"
#include "ui/aura_shell/shell_window_ids.h"
@@ -35,6 +36,13 @@ StackingController::StackingController() {
StackingController::~StackingController() {
}
+void StackingController::Init() {
+ always_on_top_controller_.reset(new internal::AlwaysOnTopController);
+ always_on_top_controller_->SetContainers(
+ GetContainer(internal::kShellWindowId_DefaultContainer),
+ GetContainer(internal::kShellWindowId_AlwaysOnTopContainer));
+}
+
// static
aura::Window* StackingController::GetActivatableWindow(aura::Window* window) {
aura::Window* parent = window->parent();
@@ -60,7 +68,7 @@ void StackingController::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/stacking_controller.h ('k') | ui/aura_shell/stacking_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698