OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/overview/window_selector.h" | 5 #include "ash/wm/overview/window_selector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // Hide the callout widgets for panels. It is safe to call this for | 270 // Hide the callout widgets for panels. It is safe to call this for |
271 // root windows that don't contain any panel windows. | 271 // root windows that don't contain any panel windows. |
272 static_cast<PanelLayoutManager*>( | 272 static_cast<PanelLayoutManager*>( |
273 Shell::GetContainer(*iter, kShellWindowId_PanelContainer) | 273 Shell::GetContainer(*iter, kShellWindowId_PanelContainer) |
274 ->layout_manager())->SetShowCalloutWidgets(false); | 274 ->layout_manager())->SetShowCalloutWidgets(false); |
275 | 275 |
276 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this)); | 276 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this)); |
277 if (grid->empty()) | 277 if (grid->empty()) |
278 continue; | 278 continue; |
279 num_items_ += grid->size(); | 279 num_items_ += grid->size(); |
280 grid_list_.push_back(grid.release()); | 280 grid_list_.push_back(grid.Pass()); |
281 } | 281 } |
282 | 282 |
283 { | 283 { |
284 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...) | 284 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...) |
285 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts | 285 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts |
286 // so that windows are correctly visible and properly animated in overview | 286 // so that windows are correctly visible and properly animated in overview |
287 // mode. Otherwise these layouts should be suppressed during overview mode | 287 // mode. Otherwise these layouts should be suppressed during overview mode |
288 // so they don't conflict with overview mode animations. The | 288 // so they don't conflict with overview mode animations. The |
289 // |restoring_minimized_windows_| flag enables the PanelLayoutManager to | 289 // |restoring_minimized_windows_| flag enables the PanelLayoutManager to |
290 // make this decision. | 290 // make this decision. |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 for (size_t i = 0; | 589 for (size_t i = 0; |
590 i <= grid_list_.size() && | 590 i <= grid_list_.size() && |
591 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { | 591 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { |
592 // TODO(flackr): If there are more than two monitors, move between grids | 592 // TODO(flackr): If there are more than two monitors, move between grids |
593 // in the requested direction. | 593 // in the requested direction. |
594 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); | 594 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); |
595 } | 595 } |
596 } | 596 } |
597 | 597 |
598 } // namespace ash | 598 } // namespace ash |
OLD | NEW |