OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MOJO_SERVICES_WINDOW_MANAGER_FOCUS_CONTROLLER_OBSERVER_H_ | |
6 #define MOJO_SERVICES_WINDOW_MANAGER_FOCUS_CONTROLLER_OBSERVER_H_ | |
7 | |
8 namespace mojo { | |
9 | |
10 class View; | |
11 | |
12 class FocusControllerObserver { | |
13 public: | |
14 // Called when |active| gains focus, or there is no active view | |
15 // (|active| is null in this case.) |old_active| refers to the | |
16 // previous active view or null if there was no previously active | |
17 // view. | |
18 virtual void OnViewActivated(View* gained_active, | |
19 View* lost_active) = 0; | |
20 | |
21 // Called when focus moves from |lost_focus| to |gained_focus|. | |
22 virtual void OnViewFocused(View* gained_focus, View* lost_focus) = 0; | |
23 | |
24 // Called when during view activation the currently active view is | |
25 // selected for activation. This can happen when a view requested for | |
26 // activation cannot be activated because a system modal view is active. | |
27 virtual void OnAttemptToReactivateView(View* request_active, | |
28 View* actual_active) {} | |
29 | |
30 protected: | |
31 virtual ~FocusControllerObserver() {} | |
32 }; | |
33 | |
34 } // namespace mojo | |
35 | |
36 #endif // MOJO_SERVICES_WINDOW_MANAGER_FOCUS_CONTROLLER_OBSERVER_H_ | |
OLD | NEW |