summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_strip_controller.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-09 18:44:51 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-09 18:44:51 +0000
commit16e785bf7ae2d1910d38e0e5843acd4648d50b21 (patch)
tree083c57b51daa703772ada68ed65a19e616a59e4a /chrome/browser/cocoa/tab_strip_controller.h
parent95b9162bf10740841d7803bcb978b87f52bfea3e (diff)
downloadchromium_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_strip_controller.h')
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.h27
1 files changed, 6 insertions, 21 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h
index 7159d8d..ab6b902 100644
--- a/chrome/browser/cocoa/tab_strip_controller.h
+++ b/chrome/browser/cocoa/tab_strip_controller.h
@@ -36,10 +36,10 @@ class ToolbarModel;
@private
TabContents* currentTab_; // weak, tab for which we're showing state
TabStripView* tabView_; // weak
+ NSView* switchView_; // weak
NSButton* newTabButton_; // weak, obtained from the nib.
TabStripModelObserverBridge* bridge_;
TabStripModel* tabModel_; // weak
- ToolbarModel* toolbarModel_; // weak, one per browser
BookmarkModel* bookmarkModel_; // weak, one per profile (= one per Browser*)
CommandUpdater* commands_; // weak, may be nil
// access to the TabContentsControllers (which own the parent view
@@ -56,33 +56,18 @@ class ToolbarModel;
}
// Initialize the controller with a view and browser that contains
-// everything else we'll need.
+// everything else we'll need. |switchView| is the view whose contents get
+// "switched" every time the user switches tabs. The children of this view
+// will be released, so if you want them to stay around, make sure
+// you have retained them.
- (id)initWithView:(TabStripView*)view
+ switchView:(NSView*)switchView
browser:(Browser*)browser;
-// Get the C++ bridge object representing the location bar for the current tab.
-- (LocationBar*)locationBar;
-
-// Updates the toolbar (and transitively the location bar) with the states of
-// the specified |tab|. If |shouldRestore| is true, we're switching
-// (back?) to this tab and should restore any previous location bar state
-// (such as user editing) as well.
-- (void)updateToolbarWithContents:(TabContents*)tab
- shouldRestoreState:(BOOL)shouldRestore;
-
-// 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 the currently selected tab.
- (NSRect)selectedTabGrowBoxRect;
-// Called to tell the selected tab to update its loading state.
-- (void)setIsLoading:(BOOL)isLoading;
-
-// Make the location bar the first responder, if possible.
-- (void)focusLocationBar;
-
// Return a boolean (ObjC BOOL, not C++ bool) to say if the bookmark
// bar is visible.
- (BOOL)isBookmarkBarVisible;