| 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/window_cycle_controller.h" | 5 #include "ash/wm/window_cycle_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/session_state_delegate.h" | 9 #include "ash/session_state_delegate.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 void WindowCycleController::OnWindowActivated(aura::Window* gained_active, | 281 void WindowCycleController::OnWindowActivated(aura::Window* gained_active, |
| 282 aura::Window* lost_active) { | 282 aura::Window* lost_active) { |
| 283 if (gained_active && !IsCycling() && | 283 if (gained_active && !IsCycling() && |
| 284 IsTrackedContainer(gained_active->parent())) { | 284 IsTrackedContainer(gained_active->parent())) { |
| 285 mru_windows_.remove(gained_active); | 285 mru_windows_.remove(gained_active); |
| 286 mru_windows_.push_front(gained_active); | 286 mru_windows_.push_front(gained_active); |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 void WindowCycleController::OnWindowActivationRequestCompleted( |
| 291 aura::Window* request_active, aura::Window* actual_active) { |
| 292 } |
| 293 |
| 290 void WindowCycleController::OnWindowAdded(aura::Window* window) { | 294 void WindowCycleController::OnWindowAdded(aura::Window* window) { |
| 291 if (window->id() == internal::kShellWindowId_WorkspaceContainer) | 295 if (window->id() == internal::kShellWindowId_WorkspaceContainer) |
| 292 window->AddObserver(this); | 296 window->AddObserver(this); |
| 293 } | 297 } |
| 294 | 298 |
| 295 void WindowCycleController::OnWillRemoveWindow(aura::Window* window) { | 299 void WindowCycleController::OnWillRemoveWindow(aura::Window* window) { |
| 296 mru_windows_.remove(window); | 300 mru_windows_.remove(window); |
| 297 if (window->id() == internal::kShellWindowId_WorkspaceContainer) | 301 if (window->id() == internal::kShellWindowId_WorkspaceContainer) |
| 298 window->RemoveObserver(this); | 302 window->RemoveObserver(this); |
| 299 } | 303 } |
| 300 | 304 |
| 301 void WindowCycleController::OnWindowDestroying(aura::Window* window) { | 305 void WindowCycleController::OnWindowDestroying(aura::Window* window) { |
| 302 window->RemoveObserver(this); | 306 window->RemoveObserver(this); |
| 303 } | 307 } |
| 304 | 308 |
| 305 } // namespace ash | 309 } // namespace ash |
| OLD | NEW |