| Index: ash/shell/window_watcher.cc
|
| diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
|
| index a85d8f6c282d4eb632cf3e438209cdf27da1daa5..97fee7d76f4e80686cf11d29a39df9c80ff48d80 100644
|
| --- a/ash/shell/window_watcher.cc
|
| +++ b/ash/shell/window_watcher.cc
|
| @@ -8,6 +8,7 @@
|
| #include "ash/launcher/launcher_model.h"
|
| #include "ash/shell.h"
|
| #include "ash/shell_window_ids.h"
|
| +#include "ui/aura/root_window.h"
|
| #include "ui/aura/window.h"
|
|
|
| namespace ash {
|
| @@ -43,9 +44,9 @@ class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver {
|
| };
|
|
|
| WindowWatcher::WindowWatcher()
|
| - : window_(ash::Shell::GetInstance()->launcher()->window_container()),
|
| + : window_(Launcher::ForPrimaryDisplay()->window_container()),
|
| panel_container_(ash::Shell::GetContainer(
|
| - Shell::GetPrimaryRootWindow(),
|
| + window_->GetRootWindow(),
|
| internal::kShellWindowId_PanelContainer)) {
|
| workspace_window_watcher_.reset(new WorkspaceWindowWatcher(this));
|
| panel_container_->AddObserver(this);
|
| @@ -76,7 +77,7 @@ void WindowWatcher::OnWindowAdded(aura::Window* new_window) {
|
| return;
|
|
|
| static int image_count = 0;
|
| - ash::LauncherModel* model = ash::Shell::GetInstance()->launcher()->model();
|
| + ash::LauncherModel* model = Launcher::ForPrimaryDisplay()->model();
|
| ash::LauncherItem item;
|
| item.type = ash::TYPE_TABBED;
|
| id_to_window_[model->next_id()] = new_window;
|
| @@ -99,8 +100,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) {
|
| - ash::LauncherModel* model =
|
| - ash::Shell::GetInstance()->launcher()->model();
|
| + ash::LauncherModel* model = Launcher::ForPrimaryDisplay()->model();
|
| int index = model->ItemIndexByID(i->first);
|
| DCHECK_NE(-1, index);
|
| model->RemoveItemAt(index);
|
|
|