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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 PanelLayoutManager::Get(window)->SetShowCalloutWidgets(true); | 389 PanelLayoutManager::Get(window)->SetShowCalloutWidgets(true); |
390 } | 390 } |
391 | 391 |
392 size_t remaining_items = 0; | 392 size_t remaining_items = 0; |
393 for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) { | 393 for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) { |
394 for (WindowSelectorItem* window_selector_item : window_grid->window_list()) | 394 for (WindowSelectorItem* window_selector_item : window_grid->window_list()) |
395 window_selector_item->RestoreWindow(); | 395 window_selector_item->RestoreWindow(); |
396 remaining_items += window_grid->size(); | 396 remaining_items += window_grid->size(); |
397 } | 397 } |
398 | 398 |
| 399 for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) |
| 400 window_grid->Shutdown(); |
| 401 |
399 DCHECK(num_items_ >= remaining_items); | 402 DCHECK(num_items_ >= remaining_items); |
400 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems", | 403 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.OverviewClosedItems", |
401 num_items_ - remaining_items); | 404 num_items_ - remaining_items); |
402 UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowSelector.TimeInOverview", | 405 UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowSelector.TimeInOverview", |
403 base::Time::Now() - overview_start_time_); | 406 base::Time::Now() - overview_start_time_); |
404 | 407 |
405 // Record metrics related to text filtering. | 408 // Record metrics related to text filtering. |
406 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringStringLength", | 409 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringStringLength", |
407 text_filter_string_length_); | 410 text_filter_string_length_); |
408 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringTextfieldCleared", | 411 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.TextFilteringTextfieldCleared", |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 for (size_t i = 0; i <= grid_list_.size() && | 706 for (size_t i = 0; i <= grid_list_.size() && |
704 grid_list_[selected_grid_index_]->Move(direction, animate); | 707 grid_list_[selected_grid_index_]->Move(direction, animate); |
705 i++) { | 708 i++) { |
706 selected_grid_index_ = | 709 selected_grid_index_ = |
707 (selected_grid_index_ + display_direction + grid_list_.size()) % | 710 (selected_grid_index_ + display_direction + grid_list_.size()) % |
708 grid_list_.size(); | 711 grid_list_.size(); |
709 } | 712 } |
710 } | 713 } |
711 | 714 |
712 } // namespace ash | 715 } // namespace ash |
OLD | NEW |