| Index: ash/common/shelf/shelf_application_menu_model.h
|
| diff --git a/ash/common/shelf/shelf_application_menu_model.h b/ash/common/shelf/shelf_application_menu_model.h
|
| index ff865fe83f2236c3a4dc3decba89665b27afbc50..7abe8b54e247b73c86f752a0f05295dae64415d8 100644
|
| --- a/ash/common/shelf/shelf_application_menu_model.h
|
| +++ b/ash/common/shelf/shelf_application_menu_model.h
|
| @@ -13,10 +13,11 @@
|
| #include "base/macros.h"
|
| #include "ui/base/models/simple_menu_model.h"
|
|
|
| -class ShelfApplicationMenuModelTestAPI;
|
| -
|
| namespace ash {
|
|
|
| +class ShelfApplicationMenuModelTestAPI;
|
| +class ShelfItemDelegate;
|
| +
|
| // A menu model listing open applications associated with a shelf item. Layout:
|
| // +---------------------------+
|
| // | |
|
| @@ -30,9 +31,11 @@ class ASH_EXPORT ShelfApplicationMenuModel
|
| : public ui::SimpleMenuModel,
|
| public ui::SimpleMenuModel::Delegate {
|
| public:
|
| - // Makes a menu with a |title|, separators, and the specified |items|.
|
| + // Makes a menu with a |title|, separators, and |items| for |delegate|.
|
| + // |delegate| may be null in unit tests that do not execute commands.
|
| ShelfApplicationMenuModel(const base::string16& title,
|
| - ShelfAppMenuItemList items);
|
| + ShelfAppMenuItemList items,
|
| + ShelfItemDelegate* delegate);
|
| ~ShelfApplicationMenuModel() override;
|
|
|
| // ui::SimpleMenuModel::Delegate:
|
| @@ -50,6 +53,9 @@ class ASH_EXPORT ShelfApplicationMenuModel
|
| // The list of menu items as returned from the shelf item's controller.
|
| ShelfAppMenuItemList items_;
|
|
|
| + // The shelf item delegate that created the menu and executes its commands.
|
| + ShelfItemDelegate* delegate_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ShelfApplicationMenuModel);
|
| };
|
|
|
|
|