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

Unified Diff: ash/shell/window_watcher.cc

Issue 2169533002: mash: Migrate shelf app list button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/shell/app_list.cc ('k') | ash/test/shell_test_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/window_watcher.cc
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
index 5254210b7501974dfb480d5eacadc75741cc32e0..64f1bc93bbae7b240d830c71a1e87aab4734e1f2 100644
--- a/ash/shell/window_watcher.cc
+++ b/ash/shell/window_watcher.cc
@@ -9,6 +9,7 @@
#include "ash/common/shelf/shelf_item_delegate_manager.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm_shell.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_util.h"
@@ -96,7 +97,7 @@ void WindowWatcher::OnWindowAdded(aura::Window* new_window) {
return;
static int image_count = 0;
- ShelfModel* model = Shell::GetInstance()->shelf_model();
+ ShelfModel* model = WmShell::Get()->shelf_model();
ShelfItem item;
item.type = new_window->type() == ui::wm::WINDOW_TYPE_PANEL
? ash::TYPE_APP_PANEL
@@ -125,7 +126,7 @@ void WindowWatcher::OnWillRemoveWindow(aura::Window* window) {
for (IDToWindow::iterator i = id_to_window_.begin(); i != id_to_window_.end();
++i) {
if (i->second == window) {
- ShelfModel* model = Shell::GetInstance()->shelf_model();
+ ShelfModel* model = WmShell::Get()->shelf_model();
int index = model->ItemIndexByID(i->first);
DCHECK_NE(-1, index);
model->RemoveItemAt(index);
« no previous file with comments | « ash/shell/app_list.cc ('k') | ash/test/shell_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698