Chromium Code Reviews| Index: ash/public/cpp/shelf_application_menu_item.h |
| diff --git a/ash/public/cpp/shelf_application_menu_item.h b/ash/public/cpp/shelf_application_menu_item.h |
| index f2d7e5355a31fe16723c1b20bcb1d59d60c7ffc6..81ffa3834616c00acaf99e31a700f783aeecb470 100644 |
| --- a/ash/public/cpp/shelf_application_menu_item.h |
| +++ b/ash/public/cpp/shelf_application_menu_item.h |
| @@ -15,23 +15,23 @@ |
| namespace ash { |
| -// The title, icon, and execute function for shelf application menu items. |
| +// The command id, title, and icon for shelf application menu items. |
| class ASH_PUBLIC_EXPORT ShelfApplicationMenuItem { |
| public: |
| - // Creates an item with a |title| and optional |icon| (pass nullptr for none). |
| - explicit ShelfApplicationMenuItem(const base::string16 title, |
| - const gfx::Image* icon = nullptr); |
| - virtual ~ShelfApplicationMenuItem(); |
| + // Creates an item with a client-specific |command_id|, a |title|, and an |
| + // optional |icon| (pass nullptr for no icon). |
| + ShelfApplicationMenuItem(uint32_t command_id, |
| + const base::string16& title, |
| + const gfx::Image* icon = nullptr); |
| + ~ShelfApplicationMenuItem(); |
| // The title and icon for this menu item. |
| + uint32_t command_id() const { return command_id_; } |
| const base::string16& title() const { return title_; } |
| const gfx::Image& icon() const { return icon_; } |
| - // Executes the menu item; |event_flags| can be used to check additional |
| - // keyboard modifiers from the event that issued this command. |
| - virtual void Execute(int event_flags); |
| - |
| private: |
| + uint32_t command_id_; |
|
James Cook
2017/03/01 19:50:48
const?
msw
2017/03/02 02:59:20
Done.
|
| const base::string16 title_; |
| const gfx::Image icon_; |