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

Unified Diff: ui/base/models/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: SubLabel and sub-label -> Sublabel and sublabel. Added description. 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/menu_model.h
diff --git a/ui/base/models/menu_model.h b/ui/base/models/menu_model.h
index 095dde521d94204ee250f4e47fff7bc4c5bff4a9..8e5331c16949b69431d72b98b9cf1745ed9190ae 100644
--- a/ui/base/models/menu_model.h
+++ b/ui/base/models/menu_model.h
@@ -58,16 +58,24 @@ class UI_EXPORT MenuModel {
// Returns the label of the item at the specified index.
virtual string16 GetLabelAt(int index) const = 0;
- // Returns true if the menu item (label/icon) at the specified index can
- // change over the course of the menu's lifetime. If this function returns
- // true, the label and icon of the menu item will be updated each time the
- // menu is shown.
+ // Returns the sublabel of the item at the specified index. The sublabel
+ // is rendered beneath the label and using the font GetSublabelFontAt().
+ virtual string16 GetSublabelAt(int index) const;
+
+ // Returns true if the menu item (label/sublabel/icon) at the specified
+ // index can change over the course of the menu's lifetime. If this function
+ // returns true, the label, sublabel and icon of the menu item will be
+ // updated each time the menu is shown.
virtual bool IsItemDynamicAt(int index) const = 0;
- // Returns the font use for the label at the specified index.
- // If NULL, then use default font.
+ // Returns the font used for the label at the specified index.
+ // If NULL, then the default font should be used.
virtual const gfx::Font* GetLabelFontAt(int index) const;
+ // Returns the font used for the sublabel at the specified index.
+ // If NULL, then the default font should be used.
+ virtual const gfx::Font* GetSublabelFontAt(int index) const;
+
// Gets the acclerator information for the specified index, returning true if
// there is a shortcut accelerator for the item, false otherwise.
virtual bool GetAcceleratorAt(int index,

Powered by Google App Engine
This is Rietveld 408576698