Chromium Code Reviews| Index: ash/shell/window_watcher.cc |
| diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc |
| index ec14e1bc13f7c83e5243e69107e3c256d3357e97..9c10f7aca906ac44379704fe69f3e3f35c5d8d67 100644 |
| --- a/ash/shell/window_watcher.cc |
| +++ b/ash/shell/window_watcher.cc |
| @@ -7,14 +7,18 @@ |
| #include "ash/launcher/launcher.h" |
| #include "ash/launcher/launcher_model.h" |
| #include "ash/shell.h" |
| +#include "ash/shell_window_ids.h" |
| #include "ui/aura/window.h" |
| namespace ash { |
| namespace shell { |
| WindowWatcher::WindowWatcher() |
| - : window_(ash::Shell::GetInstance()->launcher()->window_container()) { |
| + : window_(ash::Shell::GetInstance()->launcher()->window_container()), |
| + panel_container_(ash::Shell::GetInstance()->GetContainer( |
| + ash::internal::kShellWindowId_PanelContainer)) { |
| window_->AddObserver(this); |
| + panel_container_->AddObserver(this); |
| } |
| WindowWatcher::~WindowWatcher() { |
| @@ -37,7 +41,8 @@ ash::LauncherID WindowWatcher::GetIDByWindow(aura::Window* window) const { |
| // aura::WindowObserver overrides: |
| void WindowWatcher::OnWindowAdded(aura::Window* new_window) { |
| - if (new_window->type() != aura::client::WINDOW_TYPE_NORMAL) |
| + if (new_window->type() != aura::client::WINDOW_TYPE_NORMAL |
| + && new_window->type() != aura::client::WINDOW_TYPE_PANEL) |
|
sky
2012/04/03 20:39:37
&& on the previous line.
|
| return; |
| static int image_count = 0; |