Index: ui/base/models/simple_menu_model.h |
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h |
index 552e9b772a87232834d6b0c2c4491571ee65dfad..7d734a6ffbdd98a0d97da4bfd14eee6a34b5cd94 100644 |
--- a/ui/base/models/simple_menu_model.h |
+++ b/ui/base/models/simple_menu_model.h |
@@ -38,9 +38,10 @@ class UI_EXPORT SimpleMenuModel : public MenuModel { |
int command_id, |
ui::Accelerator* accelerator) = 0; |
- // Some command ids have labels and icons that change over time. |
+ // Some command ids have labels, sub-labels and icons that change over time. |
virtual bool IsItemForCommandIdDynamic(int command_id) const; |
virtual string16 GetLabelForCommandId(int command_id) const; |
+ virtual string16 GetSubLabelForCommandId(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, |
@@ -113,6 +114,9 @@ class UI_EXPORT SimpleMenuModel : public MenuModel { |
// Sets the icon for the item at |index|. |
void SetIcon(int index, const gfx::Image& icon); |
+ // Sets the sub-label for the item at |index|. |
+ void SetSubLabel(int index, const string16& sublabel); |
+ |
// Clears all items. Note that it does not free MenuModel of submenu. |
void Clear(); |
@@ -127,6 +131,7 @@ class UI_EXPORT SimpleMenuModel : public MenuModel { |
virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const OVERRIDE; |
virtual int GetCommandIdAt(int index) const OVERRIDE; |
virtual string16 GetLabelAt(int index) const OVERRIDE; |
+ virtual string16 GetSubLabelAt(int index) const OVERRIDE; |
virtual bool IsItemDynamicAt(int index) const OVERRIDE; |
virtual bool GetAcceleratorAt(int index, |
ui::Accelerator* accelerator) const OVERRIDE; |