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 | |
36 // This class explicitly does NOT store the active window in a window property | 34 // This class explicitly does NOT store the active window in a window property |
37 // to make sure that storing the active window in a property is not treated as | 35 // to make sure that storing the active window in a property is not treated as |
38 // part of the aura API. Assumptions to that end will cause tests that use | 36 // part of the aura API. Assumptions to that end will cause tests that use |
39 // this client to fail. | 37 // this client to fail. |
40 std::vector<Window*> active_windows_; | 38 Window* active_window_; |
41 | 39 |
42 DISALLOW_COPY_AND_ASSIGN(TestActivationClient); | 40 DISALLOW_COPY_AND_ASSIGN(TestActivationClient); |
43 }; | 41 }; |
44 | 42 |
45 } // namespace test | 43 } // namespace test |
46 } // namespace aura | 44 } // namespace aura |
47 | 45 |
48 #endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ | 46 #endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ |
OLD | NEW |