Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: ash/common/wm/overview/window_selector.cc

Issue 2154523002: Move AccessibilityDelegate ownership to ash::WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setmediadelegate
Patch Set: fix mash_unittests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/system/tray_accessibility.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/common/system/tray_accessibility.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698