| 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_AURA_CLIENT_ACTIVATION_CHANGE_OBSERVER_H_ | 5 #ifndef UI_AURA_CLIENT_ACTIVATION_CHANGE_OBSERVER_H_ |
| 6 #define UI_AURA_CLIENT_ACTIVATION_CHANGE_OBSERVER_H_ | 6 #define UI_AURA_CLIENT_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 { |
| 11 class Window; | 11 class Window; |
| 12 | 12 |
| 13 namespace client { | 13 namespace client { |
| 14 | 14 |
| 15 class AURA_EXPORT ActivationChangeObserver { | 15 class AURA_EXPORT ActivationChangeObserver { |
| 16 public: | 16 public: |
| 17 // Called when |active| gains focus, or there is no active window | 17 // Called when |active| gains focus, or there is no active window |
| 18 // (|active| is NULL in this case.) |old_active| refers to the | 18 // (|active| is NULL in this case.) |old_active| refers to the |
| 19 // previous active window or NULL if there was no previously active | 19 // previous active window or NULL if there was no previously active |
| 20 // window. | 20 // window. |
| 21 virtual void OnWindowActivated(Window* active, Window* old_active) = 0; | 21 virtual void OnWindowActivated(Window* active, Window* old_active) = 0; |
| 22 | 22 |
| 23 protected: | 23 protected: |
| 24 virtual ~ActivationChangeObserver() {} | 24 ActivationChangeObserver(); |
| 25 virtual ~ActivationChangeObserver(); |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 } // namespace client | 28 } // namespace client |
| 28 } // namespace aura | 29 } // namespace aura |
| 29 | 30 |
| 30 #endif // UI_AURA_CLIENT_ACTIVATION_CHANGE_OBSERVER_H_ | 31 #endif // UI_AURA_CLIENT_ACTIVATION_CHANGE_OBSERVER_H_ |
| OLD | NEW |