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

Unified Diff: ui/base/models/simple_menu_model.h

Issue 12755019: Add 2-lines summary to CC/Address for Wallet items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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;

Powered by Google App Engine
This is Rietveld 408576698