summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_strip_controller.h
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 00:57:49 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 00:57:49 +0000
commit44b2c885548d647611d908309dfdf6306eac7ed8 (patch)
treec46fd5199ac07df770ca9b01a0b73dc594b6d63d /chrome/browser/cocoa/tab_strip_controller.h
parent9eef357377e89bffd2d5ff9fad9de0c94d8cc934 (diff)
downloadchromium_src-44b2c885548d647611d908309dfdf6306eac7ed8.zip
chromium_src-44b2c885548d647611d908309dfdf6306eac7ed8.tar.gz
chromium_src-44b2c885548d647611d908309dfdf6306eac7ed8.tar.bz2
Mac bookmark work.
- The bookmark menu is populated dynamically with bookmarks, including subfolders --> submenus. E.g. star something --> shows up in menu. Menu items are disabled but always present and current. - Always Show Bookmarks" menu now live; reads from / writes to preference, and shows correct "toggle state". - Bookmark bar on each tab, present if requested. (Currently an empty box). - Random stuff; e.g. bookmark prefs init moved to a x-plat location. This CL does not contain Cole's views. Bried english description of the nib file changes: - add a new view for the bookmark bar in the tab; hook it up to the controller - Many tag sets (e.g. View-->Always Show Bookmarks Bar now 40009) - Remove dummy bookmark menu items Review URL: http://codereview.chromium.org/46078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller.h')
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h
index b38bd19..0bd7df4 100644
--- a/chrome/browser/cocoa/tab_strip_controller.h
+++ b/chrome/browser/cocoa/tab_strip_controller.h
@@ -7,9 +7,13 @@
#import <Cocoa/Cocoa.h>
+@class TabStripView;
+@class BookmarkBarStateController;
+
+class BookmarkModel;
+class Browser;
class CommandUpdater;
class LocationBar;
-@class TabStripView;
class TabStripBridge;
class TabStripModel;
class TabContents;
@@ -34,6 +38,7 @@ class ToolbarModel;
TabStripBridge* 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
// for the toolbar and associated tab contents) given an index. This needs
@@ -43,15 +48,15 @@ class ToolbarModel;
// an array of TabControllers which manage the actual tab views. As above,
// this is kept in the same order as the tab strip model.
NSMutableArray* tabArray_;
+
+ // Controller for bookmark bar state, shared among all TabContents.
+ BookmarkBarStateController* bookmarkBarStateController_;
}
-// Initialize the controller with a view, model, and command updater for
-// tracking what's enabled and disabled. |commands| may be nil if no updating
-// is desired.
+// Initialize the controller with a view and browser that contains
+// everything else we'll need.
- (id)initWithView:(TabStripView*)view
- tabModel:(TabStripModel*)tabModel
- toolbarModel:(ToolbarModel*)toolbarModel
- commands:(CommandUpdater*)commands;
+ browser:(Browser*)browser;
// Get the C++ bridge object representing the location bar for the current tab.
- (LocationBar*)locationBar;
@@ -76,6 +81,13 @@ class ToolbarModel;
// 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;
+
+// Turn on or off the bookmark bar for *ALL* tabs.
+- (void)toggleBookmarkBar;
+
@end
#endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_