| Index: ash/shelf/shelf_window_watcher_item_delegate.cc
|
| diff --git a/ash/shelf/shelf_window_watcher_item_delegate.cc b/ash/shelf/shelf_window_watcher_item_delegate.cc
|
| index 6c7cc6565dcfda44f1298be9f9b0614ddaaed7b0..53fd1008088bf08cb06b264ec678198130dec13e 100644
|
| --- a/ash/shelf/shelf_window_watcher_item_delegate.cc
|
| +++ b/ash/shelf/shelf_window_watcher_item_delegate.cc
|
| @@ -4,7 +4,10 @@
|
|
|
| #include "ash/shelf/shelf_window_watcher_item_delegate.h"
|
|
|
| +#include "ash/shelf/shelf_model.h"
|
| #include "ash/shelf/shelf_util.h"
|
| +#include "ash/shell.h"
|
| +#include "ash/shell_delegate.h"
|
| #include "ash/wm/window_state.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/views/corewm/window_animations.h"
|
| @@ -14,8 +17,9 @@ namespace ash {
|
| namespace internal {
|
|
|
| ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(
|
| - aura::Window* window)
|
| - : window_(window) {
|
| + aura::Window* window, ShelfModel* model)
|
| + : window_(window),
|
| + model_(model) {
|
| }
|
|
|
| ShelfWindowWatcherItemDelegate::~ShelfWindowWatcherItemDelegate() {
|
| @@ -47,8 +51,11 @@ base::string16 ShelfWindowWatcherItemDelegate::GetTitle() {
|
|
|
| ui::MenuModel* ShelfWindowWatcherItemDelegate::CreateContextMenu(
|
| aura::Window* root_window) {
|
| - // TODO(simonhong): Create ShelfItemContextMenu.
|
| - return NULL;
|
| + ash::LauncherItem item =
|
| + *(model_->ItemByID(GetLauncherIDForWindow(window_)));
|
| + return Shell::GetInstance()->delegate()->CreateContextMenu(root_window,
|
| + this,
|
| + &item);
|
| }
|
|
|
| ShelfMenuModel* ShelfWindowWatcherItemDelegate::CreateApplicationMenu(
|
|
|