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/common/wm/overview/window_selector.h" | 5 #include "ash/common/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 <utility> |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 ResetFocusRestoreWindow(true); | 391 ResetFocusRestoreWindow(true); |
392 RemoveAllObservers(); | 392 RemoveAllObservers(); |
393 | 393 |
394 std::vector<WmWindow*> root_windows = WmShell::Get()->GetAllRootWindows(); | 394 std::vector<WmWindow*> root_windows = WmShell::Get()->GetAllRootWindows(); |
395 for (WmWindow* window : root_windows) { | 395 for (WmWindow* window : root_windows) { |
396 // Un-hide the callout widgets for panels. It is safe to call this for | 396 // Un-hide the callout widgets for panels. It is safe to call this for |
397 // root_windows that don't contain any panel windows. | 397 // root_windows that don't contain any panel windows. |
398 PanelLayoutManager::Get(window)->SetShowCalloutWidgets(true); | 398 PanelLayoutManager::Get(window)->SetShowCalloutWidgets(true); |
399 } | 399 } |
400 | 400 |
| 401 for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) |
| 402 window_grid->Shutdown(); |
| 403 |
401 DCHECK(num_items_ >= remaining_items); | 404 DCHECK(num_items_ >= remaining_items); |
402 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems", | 405 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems", |
403 num_items_ - remaining_items); | 406 num_items_ - remaining_items); |
404 UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowSelector.TimeInOverview", | 407 UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowSelector.TimeInOverview", |
405 base::Time::Now() - overview_start_time_); | 408 base::Time::Now() - overview_start_time_); |
406 | 409 |
407 // Record metrics related to text filtering. | 410 // Record metrics related to text filtering. |
408 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringStringLength", | 411 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringStringLength", |
409 text_filter_string_length_); | 412 text_filter_string_length_); |
410 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringTextfieldCleared", | 413 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringTextfieldCleared", |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 for (size_t i = 0; i <= grid_list_.size() && | 708 for (size_t i = 0; i <= grid_list_.size() && |
706 grid_list_[selected_grid_index_]->Move(direction, animate); | 709 grid_list_[selected_grid_index_]->Move(direction, animate); |
707 i++) { | 710 i++) { |
708 selected_grid_index_ = | 711 selected_grid_index_ = |
709 (selected_grid_index_ + display_direction + grid_list_.size()) % | 712 (selected_grid_index_ + display_direction + grid_list_.size()) % |
710 grid_list_.size(); | 713 grid_list_.size(); |
711 } | 714 } |
712 } | 715 } |
713 | 716 |
714 } // namespace ash | 717 } // namespace ash |
OLD | NEW |