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

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: DisplayNameLine2 -> DisplayNameDetail. 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 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;

Powered by Google App Engine
This is Rietveld 408576698