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 06917f3de0ed236682f392d5e55620e810aea651..7ab284ea83ca5c97ab4f2b9be7c1159812fd99a8 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, |
@@ -114,6 +115,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(); |
@@ -128,6 +132,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; |