Index: ui/aura/mus/focus_synchronizer.h |
diff --git a/ui/aura/mus/focus_synchronizer.h b/ui/aura/mus/focus_synchronizer.h |
index cca9ebaf2e7a0a78b7ddd445f3f40f5c230e89b7..b2908cb7ce92fd54b188e95840a0025e20ce7136 100644 |
--- a/ui/aura/mus/focus_synchronizer.h |
+++ b/ui/aura/mus/focus_synchronizer.h |
@@ -28,7 +28,12 @@ class FocusClient; |
} |
// FocusSynchronizer is resonsible for keeping focus in sync between aura |
-// and the mus server. |
+// and the mus server. FocusSynchronizer may be configured in two distinct |
+// ways: |
+// . SetSingletonFocusClient(). Use this when a single FocusClient is shared |
+// among all windows and never changes. |
+// . SetActiveFocusClient(). Use this when there may be more than one |
+// FocusClient. |
class AURA_EXPORT FocusSynchronizer : public client::FocusChangeObserver, |
public WindowObserver { |
public: |
@@ -51,6 +56,11 @@ class AURA_EXPORT FocusSynchronizer : public client::FocusChangeObserver, |
// Called when the focused window is destroyed. |
void OnFocusedWindowDestroyed(); |
+ // Used when the focus client is shared among all windows. See class |
+ // description for details. |
+ void SetSingletonFocusClient(client::FocusClient* focus_client); |
+ bool is_singleton_focus_client() const { return is_singleton_focus_client_; } |
+ |
// Sets the active FocusClient and the window the FocusClient is associated |
// with. |focus_client_root| is not necessarily the window that actually has |
// focus. |
@@ -86,6 +96,8 @@ class AURA_EXPORT FocusSynchronizer : public client::FocusChangeObserver, |
bool setting_focus_ = false; |
WindowMus* window_setting_focus_to_ = nullptr; |
+ bool is_singleton_focus_client_ = false; |
+ |
client::FocusClient* active_focus_client_ = nullptr; |
// The window that |active_focus_client_| is associated with. |
Window* active_focus_client_root_ = nullptr; |