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

Unified Diff: ui/aura/client/focus_client.h

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/client/focus_change_observer.h ('k') | ui/aura/client/focus_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/client/focus_client.h
===================================================================
--- ui/aura/client/focus_client.h (revision 0)
+++ ui/aura/client/focus_client.h (revision 0)
@@ -0,0 +1,46 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_AURA_CLIENT_FOCUS_CLIENT_H_
+#define UI_AURA_CLIENT_FOCUS_CLIENT_H_
+
+#include "ui/aura/aura_export.h"
+
+namespace ui {
+class Event;
+}
+
+namespace aura {
+class RootWindow;
+class Window;
+
+namespace client {
+class FocusChangeObserver;
+
+// An interface implemented by an object that manages window focus.
+class AURA_EXPORT FocusClient {
+ public:
+ virtual ~FocusClient() {}
+
+ // TODO(beng): these methods will be OBSOLETE by FocusChangeEvent.
+ virtual void AddObserver(FocusChangeObserver* observer) = 0;
+ virtual void RemoveObserver(FocusChangeObserver* observer) = 0;
+
+ // Focuses |window|. Passing NULL clears focus.
+ // TODO(beng): |event| may be obsolete.
+ virtual void FocusWindow(Window* window, const ui::Event* event) = 0;
+
+ // Retrieves the focused window, or NULL if there is none.
+ virtual Window* GetFocusedWindow() = 0;
+};
+
+// Sets/Gets the focus client on the RootWindow.
+AURA_EXPORT void SetFocusClient(RootWindow* root_window, FocusClient* client);
+AURA_EXPORT FocusClient* GetFocusClient(Window* window);
+AURA_EXPORT FocusClient* GetFocusClient(const Window* window);
+
+} // namespace clients
+} // namespace aura
+
+#endif // UI_AURA_CLIENT_FOCUS_CLIENT_H_
Property changes on: ui\aura\client\focus_client.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ui/aura/client/focus_change_observer.h ('k') | ui/aura/client/focus_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698