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 ASH_TEST_TEST_ACTIVATION_DELEGATE_H_ | 5 #ifndef ASH_TEST_TEST_ACTIVATION_DELEGATE_H_ |
6 #define ASH_TEST_TEST_ACTIVATION_DELEGATE_H_ | 6 #define ASH_TEST_TEST_ACTIVATION_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/aura/client/activation_delegate.h" | 10 #include "ui/aura/client/activation_delegate.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 void set_activate(bool v) { activate_ = v; } | 30 void set_activate(bool v) { activate_ = v; } |
31 int activated_count() const { return activated_count_; } | 31 int activated_count() const { return activated_count_; } |
32 int lost_active_count() const { return lost_active_count_; } | 32 int lost_active_count() const { return lost_active_count_; } |
33 int should_activate_count() const { return should_activate_count_; } | 33 int should_activate_count() const { return should_activate_count_; } |
34 void Clear() { | 34 void Clear() { |
35 activated_count_ = lost_active_count_ = should_activate_count_ = 0; | 35 activated_count_ = lost_active_count_ = should_activate_count_ = 0; |
36 window_was_active_ = false; | 36 window_was_active_ = false; |
37 } | 37 } |
38 | 38 |
39 // Overridden from client::ActivationDelegate: | 39 // Overridden from client::ActivationDelegate: |
40 virtual bool ShouldActivate(const aura::Event* event) OVERRIDE; | 40 virtual bool ShouldActivate(const ui::Event* event) OVERRIDE; |
41 virtual void OnActivated() OVERRIDE; | 41 virtual void OnActivated() OVERRIDE; |
42 virtual void OnLostActive() OVERRIDE; | 42 virtual void OnLostActive() OVERRIDE; |
43 | 43 |
44 private: | 44 private: |
45 aura::Window* window_; | 45 aura::Window* window_; |
46 bool window_was_active_; | 46 bool window_was_active_; |
47 bool activate_; | 47 bool activate_; |
48 int activated_count_; | 48 int activated_count_; |
49 int lost_active_count_; | 49 int lost_active_count_; |
50 int should_activate_count_; | 50 int should_activate_count_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(TestActivationDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(TestActivationDelegate); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace test | 55 } // namespace test |
56 } // namespace ash | 56 } // namespace ash |
57 | 57 |
58 #endif // ASH_TEST_TEST_ACTIVATION_DELEGATE_H_ | 58 #endif // ASH_TEST_TEST_ACTIVATION_DELEGATE_H_ |
OLD | NEW |