| Index: components/mus/ws/focus_controller.h
|
| diff --git a/components/mus/ws/focus_controller.h b/components/mus/ws/focus_controller.h
|
| index 8567f63c1055a3cf13e064f7ac8a9390e557f56e..0b1894efcf28da966488f544c227b44e3ae4be05 100644
|
| --- a/components/mus/ws/focus_controller.h
|
| +++ b/components/mus/ws/focus_controller.h
|
| @@ -13,6 +13,7 @@ namespace mus {
|
|
|
| namespace ws {
|
|
|
| +class FocusControllerDelegate;
|
| class FocusControllerObserver;
|
| class ServerWindow;
|
| class ServerWindowDrawnTracker;
|
| @@ -27,7 +28,7 @@ enum class FocusControllerChangeSource {
|
| // state of the focused window changes.
|
| class FocusController : public ServerWindowDrawnTrackerObserver {
|
| public:
|
| - FocusController();
|
| + explicit FocusController(FocusControllerDelegate* delegate);
|
| ~FocusController() override;
|
|
|
| // Sets the focused window. Does nothing if |window| is currently focused.
|
| @@ -35,9 +36,6 @@ class FocusController : public ServerWindowDrawnTrackerObserver {
|
| void SetFocusedWindow(ServerWindow* window);
|
| ServerWindow* GetFocusedWindow();
|
|
|
| - // Moves activation to the next activatable window.
|
| - void CycleActivationForward();
|
| -
|
| void AddObserver(FocusControllerObserver* observer);
|
| void RemoveObserver(FocusControllerObserver* observer);
|
|
|
| @@ -46,6 +44,10 @@ class FocusController : public ServerWindowDrawnTrackerObserver {
|
| bool CanBeFocused(ServerWindow* window) const;
|
| bool CanBeActivated(ServerWindow* window) const;
|
|
|
| + // Returns the closest activatable ancestor of |window|. Returns nullptr if
|
| + // there is no such ancestor.
|
| + ServerWindow* GetActivatableAncestorOf(ServerWindow* window) const;
|
| +
|
| // Implementation of SetFocusedWindow().
|
| void SetFocusedWindowImpl(FocusControllerChangeSource change_source,
|
| ServerWindow* window);
|
| @@ -55,7 +57,14 @@ class FocusController : public ServerWindowDrawnTrackerObserver {
|
| ServerWindow* window,
|
| bool is_drawn) override;
|
|
|
| + FocusControllerDelegate* delegate_;
|
| +
|
| + ServerWindow* focused_window_;
|
| + ServerWindow* active_window_;
|
| +
|
| base::ObserverList<FocusControllerObserver> observers_;
|
| +
|
| + // Keeps track of the visibility of the focused and active window.
|
| scoped_ptr<ServerWindowDrawnTracker> drawn_tracker_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FocusController);
|
|
|