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 #include "ui/aura/test/test_activation_client.h" | 5 #include "ui/aura/test/test_activation_client.h" |
6 | 6 |
7 #include "ui/aura/client/activation_delegate.h" | 7 #include "ui/aura/client/activation_delegate.h" |
8 #include "ui/aura/root_window.h" | 8 #include "ui/aura/root_window.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 aura::client::GetActivationDelegate(window)->OnLostActive(); | 55 aura::client::GetActivationDelegate(window)->OnLostActive(); |
56 } | 56 } |
57 | 57 |
58 Window* TestActivationClient::GetActiveWindow() { | 58 Window* TestActivationClient::GetActiveWindow() { |
59 if (active_windows_.empty()) | 59 if (active_windows_.empty()) |
60 return NULL; | 60 return NULL; |
61 return active_windows_.back(); | 61 return active_windows_.back(); |
62 } | 62 } |
63 | 63 |
64 bool TestActivationClient::OnWillFocusWindow(Window* window, | 64 bool TestActivationClient::OnWillFocusWindow(Window* window, |
65 const Event* event) { | 65 const ui::Event* event) { |
66 return true; | 66 return true; |
67 } | 67 } |
68 | 68 |
69 bool TestActivationClient::CanActivateWindow(Window* window) const { | 69 bool TestActivationClient::CanActivateWindow(Window* window) const { |
70 return true; | 70 return true; |
71 } | 71 } |
72 | 72 |
73 //////////////////////////////////////////////////////////////////////////////// | 73 //////////////////////////////////////////////////////////////////////////////// |
74 // TestActivationClient, WindowObserver implementation: | 74 // TestActivationClient, WindowObserver implementation: |
75 | 75 |
(...skipping 15 matching lines...) Expand all Loading... |
91 if (active_windows_[i] == window) { | 91 if (active_windows_[i] == window) { |
92 active_windows_.erase(active_windows_.begin() + i); | 92 active_windows_.erase(active_windows_.begin() + i); |
93 window->RemoveObserver(this); | 93 window->RemoveObserver(this); |
94 return; | 94 return; |
95 } | 95 } |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 } // namespace test | 99 } // namespace test |
100 } // namespace aura | 100 } // namespace aura |
OLD | NEW |