OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_MRU_WINDOW_TRACKER_H_ | 5 #ifndef ASH_WM_MRU_WINDOW_TRACKER_H_ |
6 #define ASH_WM_MRU_WINDOW_TRACKER_H_ | 6 #define ASH_WM_MRU_WINDOW_TRACKER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // MRU window list. Used by WindowCycleList to avoid adding all cycled | 58 // MRU window list. Used by WindowCycleList to avoid adding all cycled |
59 // windows to the front of the MRU window list. | 59 // windows to the front of the MRU window list. |
60 void SetIgnoreActivations(bool ignore); | 60 void SetIgnoreActivations(bool ignore); |
61 | 61 |
62 private: | 62 private: |
63 // Updates the mru_windows_ list to insert/move |active_window| at/to the | 63 // Updates the mru_windows_ list to insert/move |active_window| at/to the |
64 // front. | 64 // front. |
65 void SetActiveWindow(aura::Window* active_window); | 65 void SetActiveWindow(aura::Window* active_window); |
66 | 66 |
67 // Overridden from aura::client::ActivationChangeObserver: | 67 // Overridden from aura::client::ActivationChangeObserver: |
68 void OnWindowActivated(aura::Window* gained_active, | 68 void OnWindowActivated( |
69 aura::Window* lost_active) override; | 69 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 70 aura::Window* gained_active, |
| 71 aura::Window* lost_active) override; |
70 | 72 |
71 // Overridden from WindowObserver: | 73 // Overridden from WindowObserver: |
72 void OnWindowDestroyed(aura::Window* window) override; | 74 void OnWindowDestroyed(aura::Window* window) override; |
73 | 75 |
74 // Uses the focus rules to check whether the window can be activateable, | 76 // Uses the focus rules to check whether the window can be activateable, |
75 // regardless of the state of the System modal dialog. | 77 // regardless of the state of the System modal dialog. |
76 bool IsWindowConsideredActivateable(aura::Window* window) const; | 78 bool IsWindowConsideredActivateable(aura::Window* window) const; |
77 | 79 |
78 // List of windows that have been activated in containers that we cycle | 80 // List of windows that have been activated in containers that we cycle |
79 // through, sorted by most recently used. | 81 // through, sorted by most recently used. |
80 std::list<aura::Window*> mru_windows_; | 82 std::list<aura::Window*> mru_windows_; |
81 | 83 |
82 aura::client::ActivationClient* activation_client_; // Not owned. | 84 aura::client::ActivationClient* activation_client_; // Not owned. |
83 | 85 |
84 wm::AshFocusRules* focus_rules_; // Not owned. | 86 wm::AshFocusRules* focus_rules_; // Not owned. |
85 | 87 |
86 bool ignore_window_activations_; | 88 bool ignore_window_activations_; |
87 | 89 |
88 DISALLOW_COPY_AND_ASSIGN(MruWindowTracker); | 90 DISALLOW_COPY_AND_ASSIGN(MruWindowTracker); |
89 }; | 91 }; |
90 | 92 |
91 } // namespace ash | 93 } // namespace ash |
92 | 94 |
93 #endif // ASH_WM_MRU_WINDOW_TRACKER_H_ | 95 #endif // ASH_WM_MRU_WINDOW_TRACKER_H_ |
OLD | NEW |