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_list.h" | 5 #include "ash/wm/window_cycle_list.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/mru_window_tracker.h" | 8 #include "ash/wm/mru_window_tracker.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 #include "ui/views/corewm/window_animations.h" | 11 #include "ui/wm/core/window_animations.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 | 14 |
15 WindowCycleList::WindowCycleList(const WindowList& windows) | 15 WindowCycleList::WindowCycleList(const WindowList& windows) |
16 : windows_(windows), | 16 : windows_(windows), |
17 current_index_(-1) { | 17 current_index_(-1) { |
18 ash::Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(true); | 18 ash::Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(true); |
19 // Locate the currently active window in the list to use as our start point. | 19 // Locate the currently active window in the list to use as our start point. |
20 aura::Window* active_window = wm::GetActiveWindow(); | 20 aura::Window* active_window = wm::GetActiveWindow(); |
21 | 21 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 DCHECK(i != windows_.end()); | 76 DCHECK(i != windows_.end()); |
77 int removed_index = static_cast<int>(i - windows_.begin()); | 77 int removed_index = static_cast<int>(i - windows_.begin()); |
78 windows_.erase(i); | 78 windows_.erase(i); |
79 if (current_index_ > removed_index) | 79 if (current_index_ > removed_index) |
80 current_index_--; | 80 current_index_--; |
81 else if (current_index_ == static_cast<int>(windows_.size())) | 81 else if (current_index_ == static_cast<int>(windows_.size())) |
82 current_index_--; | 82 current_index_--; |
83 } | 83 } |
84 | 84 |
85 } // namespace ash | 85 } // namespace ash |
OLD | NEW |