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

Unified Diff: ash/system/tray/system_tray.cc

Issue 2101263004: mash: Migrate AccessibilityDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index daddcb370d4ccfeeb134e0b6334d96eac3ee96b2..dc175f97b442cf64f90da19bfb6f5b47c4833db7 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -23,7 +23,6 @@
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
-#include "ash/shell.h"
James Cook 2016/06/28 22:34:25 Hooray!
msw 2016/06/28 22:49:50 Acknowledged.
#include "ash/system/cast/tray_cast.h"
#include "ash/system/user/tray_user.h"
#include "base/logging.h"
@@ -100,9 +99,7 @@ class SystemBubbleWrapper {
// If ChromeVox is enabled, focus the default item if no item is focused and
// there isn't a delayed close.
- if (Shell::GetInstance()
- ->accessibility_delegate()
- ->IsSpokenFeedbackEnabled() &&
+ if (WmShell::Get()->GetAccessibilityDelegate()->IsSpokenFeedbackEnabled() &&
!is_persistent) {
bubble_->FocusDefaultIfNeeded();
}
@@ -461,11 +458,8 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
if (system_bubble_.get() && creation_type == BUBBLE_USE_EXISTING) {
system_bubble_->bubble()->UpdateView(items, bubble_type);
// If ChromeVox is enabled, focus the default item if no item is focused.
- if (Shell::GetInstance()
- ->accessibility_delegate()
- ->IsSpokenFeedbackEnabled()) {
+ if (WmShell::Get()->GetAccessibilityDelegate()->IsSpokenFeedbackEnabled())
system_bubble_->bubble()->FocusDefaultIfNeeded();
- }
} else {
// Cleanup the existing bubble before showing a new one. Otherwise, it's
// possible to confuse the new system bubble with the old one during

Powered by Google App Engine
This is Rietveld 408576698