summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_toolbar_view.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 18:01:08 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 18:01:08 +0000
commit3302102a21dcdae93f17f2db57ba32ba0e8dd1da (patch)
treee8f3b5e53324e77a3dc6502a0d555e93a25261b2 /chrome/browser/cocoa/bookmark_bar_toolbar_view.h
parent9398185452c106c0f464747fd76d70f3d212143a (diff)
downloadchromium_src-3302102a21dcdae93f17f2db57ba32ba0e8dd1da.zip
chromium_src-3302102a21dcdae93f17f2db57ba32ba0e8dd1da.tar.gz
chromium_src-3302102a21dcdae93f17f2db57ba32ba0e8dd1da.tar.bz2
Mac: Theme the bookmark bar on the new tab page.
- XIB change: The controller has a connection to buttonView_. - BrowserThemeProviderMac: Fix a bug where we weren't returning default colors; we returned nil instead. - The majority of the implementation is actually the cross platform NtpBackgroundUtil::PaintBackgroundDetachedMode. We do platform specific drawing on top of the background, though. TEST=BookmarkBarToolbarViewTest.DisplayAsFloatingBarWithNoImage TEST=BookmarkBarToolbarViewTest.DisplayAsFloatingBarWithBgImage BUG=http://crbug.com/17625 Review URL: http://codereview.chromium.org/266027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_toolbar_view.h')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_toolbar_view.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_toolbar_view.h b/chrome/browser/cocoa/bookmark_bar_toolbar_view.h
index 2808cc5..cfc9288 100644
--- a/chrome/browser/cocoa/bookmark_bar_toolbar_view.h
+++ b/chrome/browser/cocoa/bookmark_bar_toolbar_view.h
@@ -15,11 +15,40 @@
#import "chrome/browser/cocoa/background_gradient_view.h"
@protocol BookmarkBarFloating;
+@class BookmarkBarView;
+class TabContents;
+class ThemeProvider;
+
+// An interface to allow mocking of a BookmarkBarController by the
+// BookmarkBarToolbarView.
+@protocol BookmarkBarToolbarViewController
+// Displaying the bookmark toolbar background in floating mode requires the
+// size of the currently selected tab to properly calculate where the
+// background image is joined.
+- (int)currentTabContentsHeight;
+
+// Current theme provider, passed to the cross platform NtpBackgroundUtil class.
+- (ThemeProvider*)themeProvider;
+
+// Returns true if the bookmark bar should be drawn as if it's a disconnected
+// bookmark bar on the New Tag Page.
+- (BOOL)drawAsFloatingBar;
+@end
@interface BookmarkBarToolbarView : BackgroundGradientView {
@private
- IBOutlet id<BookmarkBarFloating> controller_;
+ // The controller which tells us how we should be drawing (as normal or as a
+ // floating bar).
+ IBOutlet id<BookmarkBarToolbarViewController> controller_;
+
+ // The bookmark bar's contents.
+ IBOutlet BookmarkBarView* buttonView_;
}
+
+// Called by our controller to layout our subviews, so that on new tab pages,
+// we have a border.
+- (void)layoutViews;
+
@end
#endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_