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

Unified Diff: ui/aura_shell/workspace_controller.cc

Issue 8926004: Revert 114095 - Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/workspace_controller.h ('k') | ui/aura_shell/workspace_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/workspace_controller.cc
===================================================================
--- ui/aura_shell/workspace_controller.cc (revision 114099)
+++ ui/aura_shell/workspace_controller.cc (working copy)
@@ -4,14 +4,12 @@
#include "ui/aura_shell/workspace_controller.h"
-#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/aura_shell/default_container_layout_manager.h"
#include "ui/aura_shell/launcher/launcher.h"
#include "ui/aura_shell/launcher/launcher_model.h"
#include "ui/aura_shell/shell.h"
-#include "ui/aura_shell/window_util.h"
#include "ui/aura_shell/workspace/workspace.h"
#include "ui/aura_shell/workspace/workspace_manager.h"
@@ -23,7 +21,6 @@
launcher_model_(NULL),
ignore_move_event_(false) {
workspace_manager_->AddObserver(this);
- aura::RootWindow::GetInstance()->AddRootWindowObserver(this);
aura::RootWindow::GetInstance()->AddObserver(this);
}
@@ -32,7 +29,6 @@
if (launcher_model_)
launcher_model_->RemoveObserver(this);
aura::RootWindow::GetInstance()->RemoveObserver(this);
- aura::RootWindow::GetInstance()->RemoveRootWindowObserver(this);
}
void WorkspaceController::ToggleOverview() {
@@ -52,18 +48,11 @@
workspace_manager_->SetWorkspaceSize(new_size);
}
-////////////////////////////////////////////////////////////////////////////////
-// WorkspaceController, aura::WindowObserver overrides:
-
-void WorkspaceController::OnWindowPropertyChanged(aura::Window* window,
- const char* key,
- void* old) {
- if (key == aura::kRootWindowActiveWindow) {
- // FindBy handles NULL.
- Workspace* workspace = workspace_manager_->FindBy(GetActiveWindow());
- if (workspace)
- workspace->Activate();
- }
+void WorkspaceController::OnActiveWindowChanged(aura::Window* active) {
+ // FindBy handles NULL.
+ Workspace* workspace = workspace_manager_->FindBy(active);
+ if (workspace)
+ workspace->Activate();
}
////////////////////////////////////////////////////////////////////////////////
Property changes on: ui\aura_shell\workspace_controller.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « ui/aura_shell/workspace_controller.h ('k') | ui/aura_shell/workspace_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698