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

Unified Diff: ash/wm/activation_controller.cc

Issue 11299219: Rework FocusManager as FocusClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « ash/wm/activation_controller.h ('k') | ash/wm/activation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/activation_controller.cc
===================================================================
--- ash/wm/activation_controller.cc (revision 169818)
+++ ash/wm/activation_controller.cc (working copy)
@@ -16,8 +16,8 @@
#include "ui/aura/client/activation_change_observer.h"
#include "ui/aura/client/activation_delegate.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
-#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
@@ -144,20 +144,20 @@
// ActivationController, public:
ActivationController::ActivationController(
- aura::FocusManager* focus_manager,
+ aura::client::FocusClient* focus_client,
ActivationControllerDelegate* delegate)
- : focus_manager_(focus_manager),
+ : focus_client_(focus_client),
updating_activation_(false),
active_window_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(observer_manager_(this)),
delegate_(delegate) {
aura::Env::GetInstance()->AddObserver(this);
- focus_manager_->AddObserver(this);
+ focus_client_->AddObserver(this);
}
ActivationController::~ActivationController() {
aura::Env::GetInstance()->RemoveObserver(this);
- focus_manager_->RemoveObserver(this);
+ focus_client_->RemoveObserver(this);
}
// static
@@ -320,8 +320,9 @@
active_window_ = window;
if (window &&
- !window->Contains(window->GetFocusManager()->GetFocusedWindow())) {
- window->GetFocusManager()->SetFocusedWindow(window, event);
+ !window->Contains(aura::client::GetFocusClient(window)->
+ GetFocusedWindow())) {
+ aura::client::GetFocusClient(window)->FocusWindow(window, event);
}
FOR_EACH_OBSERVER(aura::client::ActivationChangeObserver,
@@ -413,7 +414,7 @@
void ActivationController::FocusWindowWithEvent(const ui::Event* event) {
aura::Window* window = static_cast<aura::Window*>(event->target());
if (GetActiveWindow() != window) {
- window->GetFocusManager()->SetFocusedWindow(
+ aura::client::GetFocusClient(window)->FocusWindow(
FindFocusableWindowFor(window), event);
}
}
« no previous file with comments | « ash/wm/activation_controller.h ('k') | ash/wm/activation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698