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

Unified Diff: ash/common/wm_shell.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index bb012d7abb237310a4c141fbfe0bbdaf163b45e2..0bb9851c42ebbe41d4c0ed4e7cb60e16afa41a02 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "ash/common/accessibility_delegate.h"
#include "ash/common/focus_cycler.h"
#include "ash/common/keyboard/keyboard_ui.h"
#include "ash/common/shell_delegate.h"
@@ -45,9 +46,15 @@ WmShell* WmShell::Get() {
void WmShell::Initialize() {
// Some delegates access WmShell during their construction. Create them here
// instead of the WmShell constructor.
+ accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
media_delegate_.reset(delegate_->CreateMediaDelegate());
}
+void WmShell::Shutdown() {
+ // Accesses WmShell in its destructor.
+ accessibility_delegate_.reset();
+}
+
void WmShell::OnMaximizeModeStarted() {
FOR_EACH_OBSERVER(ShellObserver, shell_observers_, OnMaximizeModeStarted());
}
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698