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 COMPONENTS_MUS_FOCUS_CONTROLLER_H_ | 5 #ifndef COMPONENTS_MUS_FOCUS_CONTROLLER_H_ |
6 #define COMPONENTS_MUS_FOCUS_CONTROLLER_H_ | 6 #define COMPONENTS_MUS_FOCUS_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "components/mus/server_view_drawn_tracker_observer.h" | 9 #include "components/mus/server_view_drawn_tracker_observer.h" |
10 | 10 |
11 namespace mus { | 11 namespace view_manager { |
12 | 12 |
13 class FocusControllerDelegate; | 13 class FocusControllerDelegate; |
14 class ServerView; | 14 class ServerView; |
15 class ServerViewDrawnTracker; | 15 class ServerViewDrawnTracker; |
16 | 16 |
17 // Tracks a focused view. Focus is moved to another view when the drawn state | 17 // Tracks a focused view. Focus is moved to another view when the drawn state |
18 // of the focused view changes and the delegate is notified. | 18 // of the focused view changes and the delegate is notified. |
19 class FocusController : public ServerViewDrawnTrackerObserver { | 19 class FocusController : public ServerViewDrawnTrackerObserver { |
20 public: | 20 public: |
21 explicit FocusController(FocusControllerDelegate* delegate); | 21 explicit FocusController(FocusControllerDelegate* delegate); |
(...skipping 18 matching lines...) Expand all Loading... |
40 void OnDrawnStateChanged(ServerView* ancestor, | 40 void OnDrawnStateChanged(ServerView* ancestor, |
41 ServerView* view, | 41 ServerView* view, |
42 bool is_drawn) override; | 42 bool is_drawn) override; |
43 | 43 |
44 FocusControllerDelegate* delegate_; | 44 FocusControllerDelegate* delegate_; |
45 scoped_ptr<ServerViewDrawnTracker> drawn_tracker_; | 45 scoped_ptr<ServerViewDrawnTracker> drawn_tracker_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(FocusController); | 47 DISALLOW_COPY_AND_ASSIGN(FocusController); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace mus | 50 } // namespace view_manager |
51 | 51 |
52 #endif // COMPONENTS_MUS_FOCUS_CONTROLLER_H_ | 52 #endif // COMPONENTS_MUS_FOCUS_CONTROLLER_H_ |
OLD | NEW |