| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 DCHECK(!grid_list_.empty()); | 305 DCHECK(!grid_list_.empty()); |
| 306 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_); | 306 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_); |
| 307 | 307 |
| 308 Shell::GetInstance()->activation_client()->AddObserver(this); | 308 Shell::GetInstance()->activation_client()->AddObserver(this); |
| 309 | 309 |
| 310 display::Screen::GetScreen()->AddObserver(this); | 310 display::Screen::GetScreen()->AddObserver(this); |
| 311 shell->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW); | 311 shell->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW); |
| 312 // Send an a11y alert. | 312 // Send an a11y alert. |
| 313 WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert( | 313 Shell::GetInstance()->accessibility_delegate()->TriggerAccessibilityAlert( |
| 314 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); | 314 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); |
| 315 | 315 |
| 316 UpdateShelfVisibility(); | 316 UpdateShelfVisibility(); |
| 317 } | 317 } |
| 318 | 318 |
| 319 // NOTE: The work done in Shutdown() is not done in the destructor because it | 319 // NOTE: The work done in Shutdown() is not done in the destructor because it |
| 320 // may cause other, unrelated classes, (ie PanelLayoutManager) to make indirect | 320 // may cause other, unrelated classes, (ie PanelLayoutManager) to make indirect |
| 321 // calls to restoring_minimized_windows() on a partially destructed object. | 321 // calls to restoring_minimized_windows() on a partially destructed object. |
| 322 void WindowSelector::Shutdown() { | 322 void WindowSelector::Shutdown() { |
| 323 is_shut_down_ = true; | 323 is_shut_down_ = true; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 for (size_t i = 0; i <= grid_list_.size() && | 680 for (size_t i = 0; i <= grid_list_.size() && |
| 681 grid_list_[selected_grid_index_]->Move(direction, animate); | 681 grid_list_[selected_grid_index_]->Move(direction, animate); |
| 682 i++) { | 682 i++) { |
| 683 selected_grid_index_ = | 683 selected_grid_index_ = |
| 684 (selected_grid_index_ + display_direction + grid_list_.size()) % | 684 (selected_grid_index_ + display_direction + grid_list_.size()) % |
| 685 grid_list_.size(); | 685 grid_list_.size(); |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 | 688 |
| 689 } // namespace ash | 689 } // namespace ash |
| OLD | NEW |