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

Unified Diff: ui/views/corewm/focus_controller.h

Issue 11421194: Hook up the FocusController behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/views/corewm/focus_change_shim.cc ('k') | ui/views/corewm/focus_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/focus_controller.h
===================================================================
--- ui/views/corewm/focus_controller.h (revision 170746)
+++ ui/views/corewm/focus_controller.h (working copy)
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "ui/aura/client/activation_client.h"
+#include "ui/aura/client/focus_client.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/window_observer.h"
#include "ui/base/events/event_dispatcher.h"
@@ -32,6 +33,7 @@
// (The FocusController registers itself as an observer of the active and
// focused windows).
class VIEWS_EXPORT FocusController : public aura::client::ActivationClient,
+ public aura::client::FocusClient,
public ui::EventHandler,
public aura::WindowObserver,
public aura::EnvObserver,
@@ -41,14 +43,8 @@
explicit FocusController(FocusRules* rules);
virtual ~FocusController();
- // TODO(beng): FocusClient
- // Sets the focused window, resulting in focus change events being sent.
- // Must only be called with valid focusable windows per FocusRules.
- void FocusWindow(aura::Window* window);
- aura::Window* focused_window() { return focused_window_; }
-
private:
- // Overridden from aura::ActivationClient:
+ // Overridden from aura::client::ActivationClient:
virtual void AddObserver(
aura::client::ActivationChangeObserver* observer) OVERRIDE;
virtual void RemoveObserver(
@@ -61,6 +57,15 @@
const ui::Event* event) OVERRIDE;
virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
+ // Overridden from aura::client::FocusClient:
+ virtual void AddObserver(
+ aura::client::FocusChangeObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(
+ aura::client::FocusChangeObserver* observer) OVERRIDE;
+ virtual void FocusWindow(aura::Window* window,
+ const ui::Event* event) OVERRIDE;
+ virtual aura::Window* GetFocusedWindow() OVERRIDE;
+
// Overridden from ui::EventHandler:
virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
« no previous file with comments | « ui/views/corewm/focus_change_shim.cc ('k') | ui/views/corewm/focus_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698