Index: ash/shell/window_watcher.cc |
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc |
index 4dfcea4e57746993c3b900acb0fd50d8a039c4e8..ffe955c3fce571ba6bd05436ec39fffdbc995505 100644 |
--- a/ash/shell/window_watcher.cc |
+++ b/ash/shell/window_watcher.cc |
@@ -6,9 +6,11 @@ |
#include "ash/display/display_controller.h" |
#include "ash/launcher/launcher.h" |
+#include "ash/launcher/launcher_item_delegate_manager.h" |
#include "ash/launcher/launcher_model.h" |
#include "ash/shelf/shelf_widget.h" |
#include "ash/shell.h" |
+#include "ash/shell/launcher_item_delegate_impl.h" |
#include "ash/shell_window_ids.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
@@ -108,7 +110,8 @@ void WindowWatcher::OnWindowAdded(aura::Window* new_window) { |
ash::LauncherItem item; |
item.type = new_window->type() == aura::client::WINDOW_TYPE_PANEL ? |
ash::TYPE_APP_PANEL : ash::TYPE_PLATFORM_APP; |
- id_to_window_[model->next_id()] = new_window; |
+ ash::LauncherID id = model->next_id(); |
+ id_to_window_[id] = new_window; |
SkBitmap icon_bitmap; |
icon_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 16, 16); |
@@ -122,6 +125,12 @@ void WindowWatcher::OnWindowAdded(aura::Window* new_window) { |
ui::SCALE_FACTOR_100P)); |
model->Add(item); |
+ |
+ ash::LauncherItemDelegateManager* manager = |
+ ash::Shell::GetInstance()->launcher_item_delegate_manager(); |
+ manager->RegisterLauncherItemDelegate( |
+ id, |
+ new LauncherItemDelegateImpl(id, this)); |
} |
void WindowWatcher::OnWillRemoveWindow(aura::Window* window) { |