summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/menu_controller.h
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-04 09:40:44 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-04 09:40:44 +0000
commitb1e270b5b771f615ad74c91b2f98007d42a29a91 (patch)
tree4aada820e2a653ab3776c46c690560b2ea73f8a6 /chrome/browser/ui/cocoa/menu_controller.h
parent77da1199b2bc47f750545b3e49abe96754d30e27 (diff)
downloadchromium_src-b1e270b5b771f615ad74c91b2f98007d42a29a91.zip
chromium_src-b1e270b5b771f615ad74c91b2f98007d42a29a91.tar.gz
chromium_src-b1e270b5b771f615ad74c91b2f98007d42a29a91.tar.bz2
Alternate NTP: Limit width of tab titles in recent tabs menu
This is the Mac version of this CL: https://chromiumcodereview.appspot.com/11410067 It limits the width of tab titles and window names in the recent tabs menu. BUG=160844 Review URL: https://chromiumcodereview.appspot.com/11316127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170914 0039d316-1c4b-4281-b951-d872f2087c98
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_