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

Unified Diff: ash/common/wm_shell.cc

Issue 2211463002: mash: Move ShelfWindowWatcher[ItemDelegate] to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move ShelfWindowWatcher to WmShell. Created 4 years, 4 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/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index 4d8381f46915accc5bac999edb7f68a84bcbd6a5..b6a269c8ff7ad15bec13b0a7f39dd634d0d2abca 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -16,6 +16,7 @@
#include "ash/common/shelf/app_list_shelf_item_delegate.h"
#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_model.h"
+#include "ash/common/shelf/shelf_window_watcher.h"
#include "ash/common/shell_delegate.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/brightness_control_delegate.h"
@@ -75,6 +76,8 @@ void WmShell::Initialize() {
void WmShell::Shutdown() {
// Accesses WmShell in its destructor.
accessibility_delegate_.reset();
+ // ShelfWindowWatcher has window observers and a pointer to the shelf model.
+ shelf_window_watcher_.reset();
// ShelfItemDelegate subclasses it owns have complex cleanup to run (e.g. ARC
// shelf items in Chrome) so explicitly shutdown early.
shelf_model_->DestroyItemDelegates();
@@ -232,6 +235,7 @@ void WmShell::CreateShelfDelegate() {
DCHECK(GetSessionStateDelegate());
DCHECK_GT(GetSessionStateDelegate()->NumberOfLoggedInUsers(), 0);
shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model_.get()));
+ shelf_window_watcher_.reset(new ShelfWindowWatcher(shelf_model_.get()));
}
void WmShell::DeleteWindowCycleController() {
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/common/wm_window.h » ('j') | ash/mus/bridge/wm_window_mus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698