summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_controller.mm
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 21:27:50 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 21:27:50 +0000
commit79fed69d92dede3b92fd3a175b520ae6949f9233 (patch)
tree85eb64e16e6bd40f974eb89f8326ffbb142e8bee /chrome/browser/cocoa/toolbar_controller.mm
parentc8af9bba42a3f9275220c65b4aef626d2387140c (diff)
downloadchromium_src-79fed69d92dede3b92fd3a175b520ae6949f9233.zip
chromium_src-79fed69d92dede3b92fd3a175b520ae6949f9233.tar.gz
chromium_src-79fed69d92dede3b92fd3a175b520ae6949f9233.tar.bz2
Initial cut at scaffolding for mac sidetabs. No visible changes to browser without --enable-vertical-tabs, and even then, don't expect it to work.
BUG=44773 TEST=infobars, bookmark bar, tab strip, etc should all behave correctly when showing, hiding, and widnow resizing. This cl should have no visible impact without the above flag on the command line. Review URL: http://codereview.chromium.org/2475002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.mm')
-rw-r--r--chrome/browser/cocoa/toolbar_controller.mm23
1 files changed, 20 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm
index cca1db7..9d90a0c 100644
--- a/chrome/browser/cocoa/toolbar_controller.mm
+++ b/chrome/browser/cocoa/toolbar_controller.mm
@@ -154,9 +154,10 @@ class PrefObserverBridge : public NotificationObserver {
commands:(CommandUpdater*)commands
profile:(Profile*)profile
browser:(Browser*)browser
- resizeDelegate:(id<ViewResizer>)resizeDelegate {
- DCHECK(model && commands && profile);
- if ((self = [super initWithNibName:@"Toolbar"
+ resizeDelegate:(id<ViewResizer>)resizeDelegate
+ nibFileNamed:(NSString*)nibName {
+ DCHECK(model && commands && profile && [nibName length]);
+ if ((self = [super initWithNibName:nibName
bundle:mac_util::MainAppBundle()])) {
toolbarModel_ = model;
commands_ = commands;
@@ -177,6 +178,22 @@ class PrefObserverBridge : public NotificationObserver {
return self;
}
+- (id)initWithModel:(ToolbarModel*)model
+ commands:(CommandUpdater*)commands
+ profile:(Profile*)profile
+ browser:(Browser*)browser
+ resizeDelegate:(id<ViewResizer>)resizeDelegate {
+ if ((self = [self initWithModel:model
+ commands:commands
+ profile:profile
+ browser:browser
+ resizeDelegate:resizeDelegate
+ nibFileNamed:@"Toolbar"])) {
+ }
+ return self;
+}
+
+
- (void)dealloc {
// Make sure any code in the base class which assumes [self view] is
// the "parent" view continues to work.