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

Unified Diff: ash/wm/always_on_top_controller.cc

Issue 11201002: Removes worskpace 1 code. Will rename next. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove constants and add back kDisableLoginAnimations Created 8 years, 2 months 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 | « ash/wm/always_on_top_controller.h ('k') | ash/wm/base_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/always_on_top_controller.cc
diff --git a/ash/wm/always_on_top_controller.cc b/ash/wm/always_on_top_controller.cc
index 8d148db43b4850a86ecd8d6056a573318fef65b5..89783f87e6835e936ddf8b2f1d8d1caf81097c1b 100644
--- a/ash/wm/always_on_top_controller.cc
+++ b/ash/wm/always_on_top_controller.cc
@@ -14,54 +14,38 @@ namespace ash {
namespace internal {
AlwaysOnTopController::AlwaysOnTopController()
- : default_container_(NULL),
- always_on_top_container_(NULL) {
+ : always_on_top_container_(NULL) {
}
AlwaysOnTopController::~AlwaysOnTopController() {
- if (default_container_)
- default_container_->RemoveObserver(this);
if (always_on_top_container_)
always_on_top_container_->RemoveObserver(this);
}
-void AlwaysOnTopController::SetContainers(
- aura::Window* default_container,
+void AlwaysOnTopController::SetAlwaysOnTopContainer(
aura::Window* always_on_top_container) {
- if (WorkspaceController::IsWorkspace2Enabled())
- default_container = NULL;
-
- // Both containers should have no children.
+ // Container should be empty.
DCHECK(always_on_top_container->children().empty());
// We are not handling any containers yet.
- DCHECK(default_container_ == NULL && always_on_top_container_ == NULL);
-
- default_container_ = default_container;
- if (default_container_)
- default_container_->AddObserver(this);
+ DCHECK(always_on_top_container_ == NULL);
always_on_top_container_ = always_on_top_container;
always_on_top_container_->AddObserver(this);
}
aura::Window* AlwaysOnTopController::GetContainer(aura::Window* window) const {
- DCHECK(always_on_top_container_ &&
- (default_container_ || WorkspaceController::IsWorkspace2Enabled()));
+ DCHECK(always_on_top_container_);
if (window->GetProperty(aura::client::kAlwaysOnTopKey))
return always_on_top_container_;
- if (default_container_)
- return default_container_;
return GetRootWindowController(always_on_top_container_->GetRootWindow())->
workspace_controller()->GetParentForNewWindow(window);
}
void AlwaysOnTopController::OnWindowAdded(aura::Window* child) {
// Observe direct child of the containers.
- if ((default_container_ && child->parent() == default_container_) ||
- child->parent() == always_on_top_container_) {
+ if (child->parent() == always_on_top_container_)
child->AddObserver(this);
- }
}
void AlwaysOnTopController::OnWillRemoveWindow(aura::Window* child) {
@@ -81,8 +65,6 @@ void AlwaysOnTopController::OnWindowPropertyChanged(aura::Window* window,
}
void AlwaysOnTopController::OnWindowDestroyed(aura::Window* window) {
- if (window == default_container_)
- default_container_ = NULL;
if (window == always_on_top_container_)
always_on_top_container_ = NULL;
}
« no previous file with comments | « ash/wm/always_on_top_controller.h ('k') | ash/wm/base_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698