Index: components/mus/ws/focus_controller.h |
diff --git a/components/mus/ws/focus_controller.h b/components/mus/ws/focus_controller.h |
index a86c86e3912ad44114cf3ee65ff1b1ecdcecf8bd..9d3643c5285689557c193f7675902a3f80f09c83 100644 |
--- a/components/mus/ws/focus_controller.h |
+++ b/components/mus/ws/focus_controller.h |
@@ -18,6 +18,7 @@ class FocusControllerDelegate; |
class FocusControllerObserver; |
class ServerWindow; |
class ServerWindowDrawnTracker; |
+struct WindowId; |
// Describes the source of the change. |
enum class FocusControllerChangeSource { |
@@ -44,7 +45,13 @@ class FocusController : public ServerWindowDrawnTrackerObserver { |
void RemoveObserver(FocusControllerObserver* observer); |
private: |
- void SetActiveWindow(ServerWindow* window); |
+ enum class ActivationChangeReason { |
+ UNKNONW, |
+ CYCLE, // Activation changed because of ActivateNextWindow(). |
+ FOCUS, // Focus change required a different window to be activated. |
+ DRAWN_STATE_CHANGED, // Active window was hidden or destroyed. |
+ }; |
+ void SetActiveWindow(ServerWindow* window, ActivationChangeReason reason); |
// Returns whether |window| can be focused or activated. |
bool CanBeFocused(ServerWindow* window) const; |
@@ -71,6 +78,10 @@ class FocusController : public ServerWindowDrawnTrackerObserver { |
ServerWindow* root_; |
ServerWindow* focused_window_; |
ServerWindow* active_window_; |
+ // Tracks what caused |active_window_| to be activated. |
+ ActivationChangeReason activation_reason_; |
+ |
+ std::vector<WindowId> cycle_windows_; |
sky
2016/01/05 16:42:38
As far as I can tell you don't update this as wind
sadrul
2016/01/05 17:14:53
We don't need to handle new windows, since those w
|
base::ObserverList<FocusControllerObserver> observers_; |