Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: ash/public/cpp/shelf_application_menu_item.h

Issue 2716403005: mash: Remove shelf app menu item objects. (Closed)
Patch Set: Address comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/test/test_shelf_item_delegate.cc ('k') | ash/public/cpp/shelf_application_menu_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0f19b73254fb6f8f407bafa194e28258a926dfbb 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:
+ const uint32_t command_id_;
const base::string16 title_;
const gfx::Image icon_;
« no previous file with comments | « ash/common/test/test_shelf_item_delegate.cc ('k') | ash/public/cpp/shelf_application_menu_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698