diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 18:43:56 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 18:43:56 +0000 |
commit | 6fa27cff57f7d9cfee0218103be24dd289c5fe03 (patch) | |
tree | c8804cbae290439d5fc58e3ee2a1fa86a1896346 /chrome/browser | |
parent | 3ff86fc88d1dfe4ee0b9053031af042dcdb2e2fd (diff) | |
download | chromium_src-6fa27cff57f7d9cfee0218103be24dd289c5fe03.zip chromium_src-6fa27cff57f7d9cfee0218103be24dd289c5fe03.tar.gz chromium_src-6fa27cff57f7d9cfee0218103be24dd289c5fe03.tar.bz2 |
IB outlets only get filled in during awakening, not initialization. D'oh!
Review URL: http://codereview.chromium.org/20302
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.h | 1 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.mm | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/tab_contents_controller.h b/chrome/browser/cocoa/tab_contents_controller.h index 41a7569..991a783 100644 --- a/chrome/browser/cocoa/tab_contents_controller.h +++ b/chrome/browser/cocoa/tab_contents_controller.h @@ -29,6 +29,7 @@ class TabStripModel; CommandUpdater* commands_; // weak, may be nil TabContentsCommandObserver* observer_; // nil if |commands_| is nil LocationBar* locationBarBridge_; + TabContents* contents_; // weak IBOutlet NSButton* backButton_; IBOutlet NSButton* forwardButton_; IBOutlet NSButton* reloadStopButton_; diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm index 4a517e8..83d9c7d 100644 --- a/chrome/browser/cocoa/tab_contents_controller.mm +++ b/chrome/browser/cocoa/tab_contents_controller.mm @@ -75,7 +75,7 @@ class LocationBarBridge : public LocationBar { if (commands_) observer_ = new TabContentsCommandObserver(self, commands); locationBarBridge_ = new LocationBarBridge(self); - [contentsBox_ setContentView:contents->GetNativeView()]; + contents_ = contents; } return self; } @@ -89,6 +89,8 @@ class LocationBarBridge : public LocationBar { } - (void)awakeFromNib { + [contentsBox_ setContentView:contents_->GetNativeView()]; + // Provide a starting point since we won't get notifications if the state // doesn't change between tabs. [self updateToolbarCommandStatus]; |