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

Unified Diff: views/controls/menu/menu_delegate.h

Issue 6811025: Change status button menu implementation from Menu2 to MenuItemView. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changed refcount guard to use OS_CHROMEOS. Created 9 years, 8 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: views/controls/menu/menu_delegate.h
diff --git a/views/controls/menu/menu_delegate.h b/views/controls/menu/menu_delegate.h
index 6a5cc5bd1b02f913339c8e7f216277854bbe869e..b05b32a6d7176d72c866eb53abcc95d43177d6f8 100644
--- a/views/controls/menu/menu_delegate.h
+++ b/views/controls/menu/menu_delegate.h
@@ -17,6 +17,12 @@
using ui::OSExchangeData;
+namespace gfx {
+
+class Font;
+
+} // namespace gfx
+
namespace views {
class DropTargetEvent;
@@ -53,6 +59,10 @@ class MenuDelegate {
// added with an empty label.
virtual std::wstring GetLabel(int id) const;
+ // The font for the menu item label. Returning NULL selects the default
+ // menu font.
+ virtual const gfx::Font* GetLabelFont(int id) const;
oshima 2011/04/14 17:27:31 const gfx::Font&
rhashimoto 2011/04/14 18:27:04 That wouldn't allow subclasses a convenient way to
oshima 2011/04/15 17:40:12 Ah i see. Hmm, then pointer may be fine. Alternati
rhashimoto 2011/04/15 21:20:27 If we put the default in the base class then subcl
oshima 2011/04/15 22:26:51 My preference is actually above. It guarantees tha
rhashimoto 2011/04/15 23:44:32 Done.
+
// The tooltip shown for the menu item. This is invoked when the user
// hovers over the item, and no tooltip text has been set for that item.
virtual std::wstring GetTooltipText(int id, const gfx::Point& screen_loc);

Powered by Google App Engine
This is Rietveld 408576698