| 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 <utility> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "ash/accessibility_delegate.h" | 13 #include "ash/accessibility_delegate.h" |
| 13 #include "ash/ash_switches.h" | 14 #include "ash/ash_switches.h" |
| 14 #include "ash/metrics/user_metrics_recorder.h" | 15 #include "ash/metrics/user_metrics_recorder.h" |
| 15 #include "ash/root_window_controller.h" | 16 #include "ash/root_window_controller.h" |
| 16 #include "ash/shell.h" | 17 #include "ash/shell.h" |
| 17 #include "ash/shell_window_ids.h" | 18 #include "ash/shell_window_ids.h" |
| 18 #include "ash/switchable_windows.h" | 19 #include "ash/switchable_windows.h" |
| 19 #include "ash/wm/mru_window_tracker.h" | 20 #include "ash/wm/mru_window_tracker.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // Hide the callout widgets for panels. It is safe to call this for | 281 // Hide the callout widgets for panels. It is safe to call this for |
| 281 // root windows that don't contain any panel windows. | 282 // root windows that don't contain any panel windows. |
| 282 static_cast<PanelLayoutManager*>( | 283 static_cast<PanelLayoutManager*>( |
| 283 Shell::GetContainer(*iter, kShellWindowId_PanelContainer) | 284 Shell::GetContainer(*iter, kShellWindowId_PanelContainer) |
| 284 ->layout_manager())->SetShowCalloutWidgets(false); | 285 ->layout_manager())->SetShowCalloutWidgets(false); |
| 285 | 286 |
| 286 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this)); | 287 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this)); |
| 287 if (grid->empty()) | 288 if (grid->empty()) |
| 288 continue; | 289 continue; |
| 289 num_items_ += grid->size(); | 290 num_items_ += grid->size(); |
| 290 grid_list_.push_back(grid.Pass()); | 291 grid_list_.push_back(std::move(grid)); |
| 291 } | 292 } |
| 292 | 293 |
| 293 { | 294 { |
| 294 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...) | 295 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...) |
| 295 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts | 296 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts |
| 296 // so that windows are correctly visible and properly animated in overview | 297 // so that windows are correctly visible and properly animated in overview |
| 297 // mode. Otherwise these layouts should be suppressed during overview mode | 298 // mode. Otherwise these layouts should be suppressed during overview mode |
| 298 // so they don't conflict with overview mode animations. The | 299 // so they don't conflict with overview mode animations. The |
| 299 // |restoring_minimized_windows_| flag enables the PanelLayoutManager to | 300 // |restoring_minimized_windows_| flag enables the PanelLayoutManager to |
| 300 // make this decision. | 301 // make this decision. |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 for (size_t i = 0; | 638 for (size_t i = 0; |
| 638 i <= grid_list_.size() && | 639 i <= grid_list_.size() && |
| 639 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { | 640 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { |
| 640 selected_grid_index_ = | 641 selected_grid_index_ = |
| 641 (selected_grid_index_ + display_direction + grid_list_.size()) % | 642 (selected_grid_index_ + display_direction + grid_list_.size()) % |
| 642 grid_list_.size(); | 643 grid_list_.size(); |
| 643 } | 644 } |
| 644 } | 645 } |
| 645 | 646 |
| 646 } // namespace ash | 647 } // namespace ash |
| OLD | NEW |