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

Unified Diff: chrome/browser/ui/cocoa/menu_controller.h

Issue 11316127: Alternate NTP: Limit width of tab titles in recent tabs menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 1 month 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: chrome/browser/ui/cocoa/menu_controller.h
diff --git a/chrome/browser/ui/cocoa/menu_controller.h b/chrome/browser/ui/cocoa/menu_controller.h
index 16055236e70798273c0660c2e546590e6c428404..f22b2005f73851ff6e4ae5ab0bf43dafba63b38d 100644
--- a/chrome/browser/ui/cocoa/menu_controller.h
+++ b/chrome/browser/ui/cocoa/menu_controller.h
@@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/memory/scoped_nsobject.h"
+#include "base/string16.h"
namespace ui {
class MenuModel;
@@ -32,6 +33,9 @@ class MenuModel;
// |-initWithModel:useWithPopUpButtonCell:| or after the first call to |-menu|.
@property(nonatomic) BOOL useWithPopUpButtonCell;
++ (string16)elideMenuTitle:(const string16&)title
+ toWidth:(int)width;
+
// NIB-based initializer. This does not create a menu. Clients can set the
// properties of the object and the menu will be created upon the first call to
// |-menu|. Note that the menu will be immutable after creation.
@@ -71,6 +75,10 @@ class MenuModel;
fromModel:(ui::MenuModel*)model
modelIndex:(int)modelIndex;
- (NSMenu*)menuFromModel:(ui::MenuModel*)model;
+// Returns the maximum width for the menu item. Returns -1 to indicate
+// that there's no maximum width.
+- (int)maxWidthForMenuModel:(ui::MenuModel*)model
+ modelIndex:(int)modelIndex;
@end
#endif // CHROME_BROWSER_UI_COCOA_MENU_CONTROLLER_H_
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm ('k') | chrome/browser/ui/cocoa/menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698