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

Unified Diff: app/menus/simple_menu_model.h

Issue 5697005: Change SimpleMenuModel on OSX to support dynamic icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update after merge Created 10 years 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 | « app/menus/menu_model.h ('k') | app/menus/simple_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/menus/simple_menu_model.h
diff --git a/app/menus/simple_menu_model.h b/app/menus/simple_menu_model.h
index 149791c108e3c78e10ed5b9b4ffd898af6a68b79..cd4cd46a2ba37bda49697d2d33c504ce8c366877 100644
--- a/app/menus/simple_menu_model.h
+++ b/app/menus/simple_menu_model.h
@@ -34,9 +34,12 @@ class SimpleMenuModel : public MenuModel {
int command_id,
menus::Accelerator* accelerator) = 0;
- // Some command ids have labels that change over time.
- virtual bool IsLabelForCommandIdDynamic(int command_id) const;
+ // Some command ids have labels and icons that change over time.
+ virtual bool IsItemForCommandIdDynamic(int command_id) const;
virtual string16 GetLabelForCommandId(int command_id) const;
+ // Gets the icon for the item with the specified id, returning true if there
+ // is an icon, false otherwise.
+ virtual bool GetIconForCommandId(int command_id, SkBitmap* icon) const;
// Notifies the delegate that the item with the specified command id was
// visually highlighted within the menu.
@@ -100,7 +103,7 @@ class SimpleMenuModel : public MenuModel {
virtual ItemType GetTypeAt(int index) const;
virtual int GetCommandIdAt(int index) const;
virtual string16 GetLabelAt(int index) const;
- virtual bool IsLabelDynamicAt(int index) const;
+ virtual bool IsItemDynamicAt(int index) const;
virtual bool GetAcceleratorAt(int index,
menus::Accelerator* accelerator) const;
virtual bool IsItemCheckedAt(int index) const;
« no previous file with comments | « app/menus/menu_model.h ('k') | app/menus/simple_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698