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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 362 } |
363 | 363 |
364 DCHECK(!grid_list_.empty()); | 364 DCHECK(!grid_list_.empty()); |
365 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_); | 365 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_); |
366 | 366 |
367 shell->AddActivationObserver(this); | 367 shell->AddActivationObserver(this); |
368 | 368 |
369 display::Screen::GetScreen()->AddObserver(this); | 369 display::Screen::GetScreen()->AddObserver(this); |
370 shell->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW); | 370 shell->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW); |
371 // Send an a11y alert. | 371 // Send an a11y alert. |
372 WmShell::Get()->GetAccessibilityDelegate()->TriggerAccessibilityAlert( | 372 WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert( |
373 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); | 373 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); |
374 | 374 |
375 UpdateShelfVisibility(); | 375 UpdateShelfVisibility(); |
376 } | 376 } |
377 | 377 |
378 // NOTE: The work done in Shutdown() is not done in the destructor because it | 378 // NOTE: The work done in Shutdown() is not done in the destructor because it |
379 // may cause other, unrelated classes, (ie PanelLayoutManager) to make indirect | 379 // may cause other, unrelated classes, (ie PanelLayoutManager) to make indirect |
380 // calls to restoring_minimized_windows() on a partially destructed object. | 380 // calls to restoring_minimized_windows() on a partially destructed object. |
381 void WindowSelector::Shutdown() { | 381 void WindowSelector::Shutdown() { |
382 ResetFocusRestoreWindow(true); | 382 ResetFocusRestoreWindow(true); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 for (size_t i = 0; i <= grid_list_.size() && | 703 for (size_t i = 0; i <= grid_list_.size() && |
704 grid_list_[selected_grid_index_]->Move(direction, animate); | 704 grid_list_[selected_grid_index_]->Move(direction, animate); |
705 i++) { | 705 i++) { |
706 selected_grid_index_ = | 706 selected_grid_index_ = |
707 (selected_grid_index_ + display_direction + grid_list_.size()) % | 707 (selected_grid_index_ + display_direction + grid_list_.size()) % |
708 grid_list_.size(); | 708 grid_list_.size(); |
709 } | 709 } |
710 } | 710 } |
711 | 711 |
712 } // namespace ash | 712 } // namespace ash |
OLD | NEW |