| 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_TEST_TEST_ACTIVATION_CLIENT_H_ | 5 #ifndef UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ |
| 6 #define UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ | 6 #define UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // Overridden from client::ActivationClient: | 24 // Overridden from client::ActivationClient: |
| 25 virtual void ActivateWindow(Window* window) OVERRIDE; | 25 virtual void ActivateWindow(Window* window) OVERRIDE; |
| 26 virtual void DeactivateWindow(Window* window) OVERRIDE; | 26 virtual void DeactivateWindow(Window* window) OVERRIDE; |
| 27 virtual Window* GetActiveWindow() OVERRIDE; | 27 virtual Window* GetActiveWindow() OVERRIDE; |
| 28 virtual bool CanFocusWindow(Window* window) const OVERRIDE; | 28 virtual bool CanFocusWindow(Window* window) const OVERRIDE; |
| 29 | 29 |
| 30 // Overridden from WindowObserver: | 30 // Overridden from WindowObserver: |
| 31 virtual void OnWindowDestroyed(Window* window) OVERRIDE; | 31 virtual void OnWindowDestroyed(Window* window) OVERRIDE; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 void RemoveActiveWindow(Window* window); |
| 35 |
| 34 // This class explicitly does NOT store the active window in a window property | 36 // This class explicitly does NOT store the active window in a window property |
| 35 // to make sure that storing the active window in a property is not treated as | 37 // to make sure that storing the active window in a property is not treated as |
| 36 // part of the aura API. Assumptions to that end will cause tests that use | 38 // part of the aura API. Assumptions to that end will cause tests that use |
| 37 // this client to fail. | 39 // this client to fail. |
| 38 Window* active_window_; | 40 std::vector<Window*> active_windows_; |
| 39 | 41 |
| 40 DISALLOW_COPY_AND_ASSIGN(TestActivationClient); | 42 DISALLOW_COPY_AND_ASSIGN(TestActivationClient); |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 } // namespace test | 45 } // namespace test |
| 44 } // namespace aura | 46 } // namespace aura |
| 45 | 47 |
| 46 #endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ | 48 #endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ |
| OLD | NEW |