diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-09 18:44:51 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-09 18:44:51 +0000 |
commit | 16e785bf7ae2d1910d38e0e5843acd4648d50b21 (patch) | |
tree | 083c57b51daa703772ada68ed65a19e616a59e4a /chrome/browser/cocoa/tab_contents_controller.h | |
parent | 95b9162bf10740841d7803bcb978b87f52bfea3e (diff) | |
download | chromium_src-16e785bf7ae2d1910d38e0e5843acd4648d50b21.zip chromium_src-16e785bf7ae2d1910d38e0e5843acd4648d50b21.tar.gz chromium_src-16e785bf7ae2d1910d38e0e5843acd4648d50b21.tar.bz2 |
Flatten down to a single toolbar per window, significantly simplifying the tab strip as it now no longer needs to forward messages for everything. Created a toolbar controller to encapsulate much of the toolbar logic that was in the tab contents controller. Better parameterized the tab strip controller so that it could switch any view, not just the main window's content view, when switching tabs.
Review URL: http://codereview.chromium.org/65011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_contents_controller.h')
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/chrome/browser/cocoa/tab_contents_controller.h b/chrome/browser/cocoa/tab_contents_controller.h index bf97dc3..ac8bd30 100644 --- a/chrome/browser/cocoa/tab_contents_controller.h +++ b/chrome/browser/cocoa/tab_contents_controller.h @@ -9,16 +9,12 @@ @class BookmarkView; @class GrowBoxView; -@class ToolbarView; class BookmarkModel; -class CommandUpdater; -class LocationBar; -class LocationBarViewMac; class TabContents; class TabContentsCommandObserver; class TabStripModel; -class ToolbarModel; +@class ToolbarView; // A class that controls the contents of a tab, including the toolbar and // web area. @@ -36,25 +32,14 @@ class ToolbarModel; @interface TabContentsController : NSViewController { @private - CommandUpdater* commands_; // weak, may be nil TabContentsCommandObserver* observer_; // nil if |commands_| is nil - LocationBarViewMac* locationBarView_; TabContents* contents_; // weak - ToolbarModel* toolbarModel_; // weak, one per window - IBOutlet ToolbarView* toolbarView_; - BookmarkModel* bookmarkModel_; // weak; one per window // TODO(jrg): write a BookmarkView IBOutlet ToolbarView* /* BookmarkView* */ bookmarkView_; - IBOutlet NSButton* backButton_; - IBOutlet NSButton* forwardButton_; - IBOutlet NSButton* reloadButton_; - IBOutlet NSButton* starButton_; - IBOutlet NSButton* goButton_; - IBOutlet NSTextField* locationBar_; IBOutlet NSBox* contentsBox_; IBOutlet GrowBoxView* growBox_; @@ -69,16 +54,11 @@ class ToolbarModel; - (id)initWithNibName:(NSString*)name bundle:(NSBundle*)bundle contents:(TabContents*)contents - commands:(CommandUpdater*)commands - toolbarModel:(ToolbarModel*)toolbarModel bookmarkModel:(BookmarkModel*)bookmarkModel; // Take this view (toolbar and web contents) full screen - (IBAction)fullScreen:(id)sender; -// Get the C++ bridge object representing the location bar for this tab. -- (LocationBar*)locationBar; - // Called when the tab contents is about to be put into the view hierarchy as // the selected tab. Handles things such as ensuring the toolbar is correctly // enabled. @@ -89,24 +69,10 @@ class ToolbarModel; // an entirely new tab contents object. - (void)tabDidChange:(TabContents*)updatedContents; -// Called when any url bar state changes. If |tabForRestoring| is non-NULL, -// it points to a TabContents whose state we should restore. -- (void)updateToolbarWithContents:(TabContents*)tabForRestoring; - -// Sets whether or not the current page in the frontmost tab is bookmarked. -- (void)setStarredState:(BOOL)isStarred; - // Return the rect, in WebKit coordinates (flipped), of the window's grow box // in the coordinate system of the content area of this tab. - (NSRect)growBoxRect; -// Called to update the loading state. Handles updating the go/stop button -// state. -- (void)setIsLoading:(BOOL)isLoading; - -// Make the location bar the first responder, if possible. -- (void)focusLocationBar; - // Change the visibility state of the bookmark bar. - (void)toggleBookmarkBar:(BOOL)enable; |