| 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_change_observer.h" | 7 #include "ui/aura/client/activation_change_observer.h" |
| 8 #include "ui/aura/client/activation_delegate.h" | 8 #include "ui/aura/client/activation_delegate.h" |
| 9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 if (aura::client::GetActivationDelegate(window)) | 62 if (aura::client::GetActivationDelegate(window)) |
| 63 aura::client::GetActivationDelegate(window)->OnLostActive(); | 63 aura::client::GetActivationDelegate(window)->OnLostActive(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 Window* TestActivationClient::GetActiveWindow() { | 66 Window* TestActivationClient::GetActiveWindow() { |
| 67 if (active_windows_.empty()) | 67 if (active_windows_.empty()) |
| 68 return NULL; | 68 return NULL; |
| 69 return active_windows_.back(); | 69 return active_windows_.back(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 Window* TestActivationClient::GetActivatableWindow(Window* window) { |
| 73 return NULL; |
| 74 } |
| 75 |
| 72 bool TestActivationClient::OnWillFocusWindow(Window* window, | 76 bool TestActivationClient::OnWillFocusWindow(Window* window, |
| 73 const ui::Event* event) { | 77 const ui::Event* event) { |
| 74 return true; | 78 return true; |
| 75 } | 79 } |
| 76 | 80 |
| 77 bool TestActivationClient::CanActivateWindow(Window* window) const { | 81 bool TestActivationClient::CanActivateWindow(Window* window) const { |
| 78 return true; | 82 return true; |
| 79 } | 83 } |
| 80 | 84 |
| 81 //////////////////////////////////////////////////////////////////////////////// | 85 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 17 matching lines...) Expand all Loading... |
| 99 if (active_windows_[i] == window) { | 103 if (active_windows_[i] == window) { |
| 100 active_windows_.erase(active_windows_.begin() + i); | 104 active_windows_.erase(active_windows_.begin() + i); |
| 101 window->RemoveObserver(this); | 105 window->RemoveObserver(this); |
| 102 return; | 106 return; |
| 103 } | 107 } |
| 104 } | 108 } |
| 105 } | 109 } |
| 106 | 110 |
| 107 } // namespace test | 111 } // namespace test |
| 108 } // namespace aura | 112 } // namespace aura |
| OLD | NEW |