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

Unified Diff: ui/aura/root_window.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 | « ui/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
===================================================================
--- ui/aura/root_window.cc (revision 169818)
+++ ui/aura/root_window.cc (working copy)
@@ -17,9 +17,9 @@
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/event_client.h"
+#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env.h"
-#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window_host.h"
#include "ui/aura/root_window_observer.h"
#include "ui/aura/window.h"
@@ -103,7 +103,6 @@
mouse_moved_handler_(NULL),
mouse_event_dispatch_target_(NULL),
event_dispatch_target_(NULL),
- focus_manager_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(
gesture_recognizer_(ui::GestureRecognizer::Create(this))),
synthesize_mouse_move_(false),
@@ -528,10 +527,6 @@
return IsVisible();
}
-FocusManager* RootWindow::GetFocusManager() {
- return focus_manager_;
-}
-
////////////////////////////////////////////////////////////////////////////////
// RootWindow, overridden from aura::client::CaptureDelegate:
@@ -692,8 +687,8 @@
// the exception for the case where the focus managers change (otherwise a
// focus manager might dereference a deleted root window).
if (reason != WINDOW_MOVING ||
- (new_root->GetFocusManager() != focus_manager_)) {
- Window* focused_window = focus_manager_->GetFocusedWindow();
+ (client::GetFocusClient(new_root) != client::GetFocusClient(this))) {
+ Window* focused_window = client::GetFocusClient(this)->GetFocusedWindow();
if (invisible->Contains(focused_window)) {
Window* focus_to = invisible->transient_parent();
if (focus_to) {
@@ -714,7 +709,7 @@
NULL)))) {
focus_to = NULL;
}
- GetFocusManager()->SetFocusedWindow(focus_to, NULL);
+ client::GetFocusClient(this)->FocusWindow(focus_to, NULL);
}
}
@@ -793,9 +788,9 @@
if (event->key_code() == ui::VKEY_UNKNOWN)
return false;
client::EventClient* client = client::GetEventClient(GetRootWindow());
- Window* focused_window = focus_manager_->GetFocusedWindow();
+ Window* focused_window = client::GetFocusClient(this)->GetFocusedWindow();
if (client && !client->CanProcessEventsWithinSubtree(focused_window)) {
- GetFocusManager()->SetFocusedWindow(NULL, NULL);
+ client::GetFocusClient(this)->FocusWindow(NULL, NULL);
return false;
}
return ProcessKeyEvent(focused_window, event);
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698