| 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 "ash/wm/activation_controller.h" | 5 #include "ash/wm/activation_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/wm/window_modality_controller.h" | 9 #include "ash/wm/window_modality_controller.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void ActivationController::ActivateNextWindow(aura::Window* window) { | 200 void ActivationController::ActivateNextWindow(aura::Window* window) { |
| 201 if (IsActiveWindow(window)) | 201 if (IsActiveWindow(window)) |
| 202 ActivateWindow(GetTopmostWindowToActivate(window)); | 202 ActivateWindow(GetTopmostWindowToActivate(window)); |
| 203 } | 203 } |
| 204 | 204 |
| 205 aura::Window* ActivationController::GetTopmostWindowToActivate( | 205 aura::Window* ActivationController::GetTopmostWindowToActivate( |
| 206 aura::Window* ignore) const { | 206 aura::Window* ignore) const { |
| 207 const aura::Window* container = | 207 const aura::Window* container = |
| 208 default_container_for_test_ ? default_container_for_test_ : | 208 default_container_for_test_ ? default_container_for_test_ : |
| 209 GetContainer(kShellWindowId_DefaultContainer); | 209 GetContainer(kShellWindowId_DefaultContainer); |
| 210 if (!container) |
| 211 return NULL; |
| 210 for (aura::Window::Windows::const_reverse_iterator i = | 212 for (aura::Window::Windows::const_reverse_iterator i = |
| 211 container->children().rbegin(); | 213 container->children().rbegin(); |
| 212 i != container->children().rend(); | 214 i != container->children().rend(); |
| 213 ++i) { | 215 ++i) { |
| 214 if (*i != ignore && CanActivateWindow(*i)) | 216 if (*i != ignore && CanActivateWindow(*i)) |
| 215 return *i; | 217 return *i; |
| 216 } | 218 } |
| 217 return NULL; | 219 return NULL; |
| 218 } | 220 } |
| 219 | 221 |
| 220 } // namespace internal | 222 } // namespace internal |
| 221 } // namespace ash | 223 } // namespace ash |
| OLD | NEW |