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

Unified Diff: components/mus/ws/focus_controller.h

Issue 1459463004: mus: Allow the WM to specify the windows that can have active children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
Index: components/mus/ws/focus_controller.h
diff --git a/components/mus/ws/focus_controller.h b/components/mus/ws/focus_controller.h
index d63f5655b144078600c206e05e5063f132503577..7181a4c2b95a5c51022d15afa1d25a29739de654 100644
--- a/components/mus/ws/focus_controller.h
+++ b/components/mus/ws/focus_controller.h
@@ -42,6 +42,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(ServerWindow* window, ChangeSource change_source);
@@ -51,6 +55,11 @@ class FocusController : public ServerWindowDrawnTrackerObserver {
bool is_drawn) override;
FocusControllerDelegate* delegate_;
+
+ ServerWindow* focused_window_;
+ ServerWindow* active_window_;
+
+ // Keeps track of the visibility of the focused and active window.
scoped_ptr<ServerWindowDrawnTracker> drawn_tracker_;
DISALLOW_COPY_AND_ASSIGN(FocusController);

Powered by Google App Engine
This is Rietveld 408576698