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

Unified Diff: ash/shell/window_watcher.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/window_type_launcher.cc ('k') | ash/shell_unittest.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 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);
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698