summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/menu_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa/menu_controller.h')
-rw-r--r--chrome/browser/ui/cocoa/menu_controller.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/menu_controller.h b/chrome/browser/ui/cocoa/menu_controller.h
index 1605523..f22b200 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_