| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_ | 5 #ifndef UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_ |
| 6 #define UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_ | 6 #define UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
| 9 | 9 |
| 10 namespace aura { | 10 namespace aura { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual void OnWindowActivated(ActivationReason reason, | 32 virtual void OnWindowActivated(ActivationReason reason, |
| 33 Window* gained_active, | 33 Window* gained_active, |
| 34 Window* lost_active) = 0; | 34 Window* lost_active) = 0; |
| 35 | 35 |
| 36 // Called when during window activation the currently active window is | 36 // Called when during window activation the currently active window is |
| 37 // selected for activation. This can happen when a window requested for | 37 // selected for activation. This can happen when a window requested for |
| 38 // activation cannot be activated because a system modal window is active. | 38 // activation cannot be activated because a system modal window is active. |
| 39 virtual void OnAttemptToReactivateWindow(aura::Window* request_active, | 39 virtual void OnAttemptToReactivateWindow(aura::Window* request_active, |
| 40 aura::Window* actual_active) {} | 40 aura::Window* actual_active) {} |
| 41 | 41 |
| 42 protected: | |
| 43 virtual ~ActivationChangeObserver() {} | 42 virtual ~ActivationChangeObserver() {} |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 // Gets/Sets the ActivationChangeObserver for a specific window. This observer | 45 // Gets/Sets the ActivationChangeObserver for a specific window. This observer |
| 47 // is notified after the ActivationClient notifies all registered observers. | 46 // is notified after the ActivationClient notifies all registered observers. |
| 48 AURA_EXPORT void SetActivationChangeObserver( | 47 AURA_EXPORT void SetActivationChangeObserver( |
| 49 Window* window, | 48 Window* window, |
| 50 ActivationChangeObserver* observer); | 49 ActivationChangeObserver* observer); |
| 51 AURA_EXPORT ActivationChangeObserver* GetActivationChangeObserver( | 50 AURA_EXPORT ActivationChangeObserver* GetActivationChangeObserver( |
| 52 Window* window); | 51 Window* window); |
| 53 | 52 |
| 54 } // namespace client | 53 } // namespace client |
| 55 } // namespace aura | 54 } // namespace aura |
| 56 | 55 |
| 57 #endif // UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_ | 56 #endif // UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_ |
| OLD | NEW |