diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-22 19:48:52 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-22 19:48:52 +0000 |
commit | 6e452a3354856da6d4896fb3edaf96d64aad7bd0 (patch) | |
tree | 7167635293fce30366715f66c483dd57b73aaee7 /chrome/browser | |
parent | dc9323a725c94eb0b4a281dcd3a298ff69f07368 (diff) | |
download | chromium_src-6e452a3354856da6d4896fb3edaf96d64aad7bd0.zip chromium_src-6e452a3354856da6d4896fb3edaf96d64aad7bd0.tar.gz chromium_src-6e452a3354856da6d4896fb3edaf96d64aad7bd0.tar.bz2 |
remove the NSToolbar, improve the appearance a little bit. ObjC style member names.
Review URL: http://codereview.chromium.org/18501
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_window_controller.h | 14 | ||||
-rw-r--r-- | chrome/browser/browser_window_controller.mm | 23 |
2 files changed, 10 insertions, 27 deletions
diff --git a/chrome/browser/browser_window_controller.h b/chrome/browser/browser_window_controller.h index 9d99a2e..b757e48 100644 --- a/chrome/browser/browser_window_controller.h +++ b/chrome/browser/browser_window_controller.h @@ -17,16 +17,14 @@ class BrowserWindow; NSWindowController<NSUserInterfaceValidations> { @private Browser* browser_; // strong - BrowserWindow* window_shim_; // strong + BrowserWindow* windowShim_; // strong - // Some toolbar items for IB. We can remove these if we stop using IB for - // NSToolbar support (it only half works). - IBOutlet NSToolbarItem* back_button_; - IBOutlet NSToolbarItem* forward_button_; - IBOutlet NSToolbarItem* url_bar_; + // Views for the toolbar + IBOutlet NSView* toolbarView_; + IBOutlet NSTextField* urlBarView_; - // This will become its own view at some point. - IBOutlet NSView* tab_bar_view_; + // Views for the tabs + IBOutlet NSView* tabBarView_; } // Load the browser window nib and do any Cocoa-specific initialization. diff --git a/chrome/browser/browser_window_controller.mm b/chrome/browser/browser_window_controller.mm index bb5b9cc..94ab55b 100644 --- a/chrome/browser/browser_window_controller.mm +++ b/chrome/browser/browser_window_controller.mm @@ -14,7 +14,7 @@ - (id)initWithBrowser:(Browser*)browser { if ((self = [super initWithWindowNibName:@"BrowserWindow"])) { browser_ = browser; - window_shim_ = new BrowserWindowCocoa(self, [self window]); + windowShim_ = new BrowserWindowCocoa(self, [self window]); } return self; } @@ -22,18 +22,17 @@ - (void)dealloc { browser_->CloseAllTabs(); delete browser_; - delete window_shim_; + delete windowShim_; [super dealloc]; } // Access the C++ bridge between the NSWindow and the rest of Chromium - (BrowserWindow*)browserWindow { - return window_shim_; + return windowShim_; } - (void)windowDidLoad { - [(NSControl*)[url_bar_ view] - setStringValue:@"http://the.interwebs.start.here"]; + [urlBarView_ setStringValue:@"http://the.interwebs.start.here"]; } - (void)destroyBrowser { @@ -88,18 +87,4 @@ browser_->ExecuteCommand(tag); } -// NSToolbar delegate methods - -- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar { - return [NSArray arrayWithObjects:[back_button_ itemIdentifier], - [forward_button_ itemIdentifier], - [url_bar_ itemIdentifier], nil]; -} - -- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar { - return [NSArray arrayWithObjects:[back_button_ itemIdentifier], - [forward_button_ itemIdentifier], - [url_bar_ itemIdentifier], nil]; -} - @end |