| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_WS_FOCUS_CONTROLLER_H_ | 5 #ifndef SERVICES_UI_WS_FOCUS_CONTROLLER_H_ |
| 6 #define SERVICES_UI_WS_FOCUS_CONTROLLER_H_ | 6 #define SERVICES_UI_WS_FOCUS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "services/ui/ws/server_window_drawn_tracker_observer.h" | 12 #include "services/ui/ws/server_window_drawn_tracker_observer.h" |
| 13 #include "services/ui/ws/server_window_tracker.h" | 13 #include "services/ui/ws/server_window_tracker.h" |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 | 16 |
| 17 namespace ws { | 17 namespace ws { |
| 18 | 18 |
| 19 class FocusControllerDelegate; | 19 class FocusControllerDelegate; |
| 20 class FocusControllerObserver; | 20 class FocusControllerObserver; |
| 21 class ServerWindow; | 21 class ServerWindow; |
| 22 class ServerWindowDrawnTracker; | 22 class ServerWindowDrawnTracker; |
| 23 struct WindowId; | |
| 24 | 23 |
| 25 // Describes the source of the change. | 24 // Describes the source of the change. |
| 26 enum class FocusControllerChangeSource { | 25 enum class FocusControllerChangeSource { |
| 27 EXPLICIT, | 26 EXPLICIT, |
| 28 DRAWN_STATE_CHANGED, | 27 DRAWN_STATE_CHANGED, |
| 29 }; | 28 }; |
| 30 | 29 |
| 31 // Tracks the focused window. Focus is moved to another window when the drawn | 30 // Tracks the focused window. Focus is moved to another window when the drawn |
| 32 // state of the focused window changes. | 31 // state of the focused window changes. |
| 33 class FocusController : public ServerWindowDrawnTrackerObserver { | 32 class FocusController : public ServerWindowDrawnTrackerObserver { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 std::unique_ptr<ServerWindowDrawnTracker> drawn_tracker_; | 94 std::unique_ptr<ServerWindowDrawnTracker> drawn_tracker_; |
| 96 | 95 |
| 97 DISALLOW_COPY_AND_ASSIGN(FocusController); | 96 DISALLOW_COPY_AND_ASSIGN(FocusController); |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 } // namespace ws | 99 } // namespace ws |
| 101 | 100 |
| 102 } // namespace ui | 101 } // namespace ui |
| 103 | 102 |
| 104 #endif // SERVICES_UI_WS_FOCUS_CONTROLLER_H_ | 103 #endif // SERVICES_UI_WS_FOCUS_CONTROLLER_H_ |
| OLD | NEW |