Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1200)

Unified Diff: chrome/browser/cocoa/tab_contents_controller.h

Issue 46078: Mac bookmark work. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_contents_controller.h
===================================================================
--- chrome/browser/cocoa/tab_contents_controller.h (revision 11933)
+++ chrome/browser/cocoa/tab_contents_controller.h (working copy)
@@ -7,8 +7,12 @@
#include <Cocoa/Cocoa.h>
+@class BookmarkView;
+@class GrowBoxView;
+@class ToolbarView;
+
+class BookmarkModel;
class CommandUpdater;
-@class GrowBoxView;
class LocationBar;
class TabContents;
class TabContentsCommandObserver;
@@ -25,6 +29,9 @@
// As we hook things up, we'll see if this imposes other restrictions (such
// as command-handling or dispatch) that will require us to change the view
// layout.
+// TODO(jrg): Following on to pink's comments... each tab does in fact
+// have its own ToolbarView. Similarly, each also has its own
+// BookmarkView. That makes things marginally more expensive.
@interface TabContentsController : NSViewController {
@private
@@ -32,7 +39,15 @@
TabContentsCommandObserver* observer_; // nil if |commands_| is nil
LocationBar* locationBarBridge_;
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_;
@@ -41,6 +56,10 @@
IBOutlet NSTextField* locationBar_;
IBOutlet NSBox* contentsBox_;
IBOutlet GrowBoxView* growBox_;
+
+ // The contents box will have an offset if shrunk to make room for
+ // the bookmark bar.
+ BOOL contentsBoxHasOffset_;
}
// Create the contents of a tab represented by |contents| and loaded from the
@@ -50,7 +69,8 @@
bundle:(NSBundle*)bundle
contents:(TabContents*)contents
commands:(CommandUpdater*)commands
- toolbarModel:(ToolbarModel*)toolbarModel;
+ toolbarModel:(ToolbarModel*)toolbarModel
+ bookmarkModel:(BookmarkModel*)bookmarkModel;
// Take this view (toolbar and web contents) full screen
- (IBAction)fullScreen:(id)sender;
@@ -86,6 +106,9 @@
// Make the location bar the first responder, if possible.
- (void)focusLocationBar;
+// Change the visibility state of the bookmark bar.
+- (void)toggleBookmarkBar:(BOOL)enable;
+
@end
#endif // CHROME_BROWSER_COCOA_TAB_COTNENTS_CONTROLLER_H_
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698