summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 00:28:35 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 00:28:35 +0000
commit20ede07176ece47e95efa8f355ee68a61166b68c (patch)
tree87b994d26fba0129ab5c28998f7ba9e99c04c735 /chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
parent48285173b623d950ecb04be6fd120f464c447e61 (diff)
downloadchromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.zip
chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.tar.gz
chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.tar.bz2
Mac: Implements the special bookmark bar on NTP.
Based mostly on Ben's patch, but made it compile, work, and descoped moving the bookmark bar around the view heiarchy. XIB modification: The root view is now a BookmarkBarToolbarView instead of an NSView and is [BookmarkBarController view]. BUG=17625 Review URL: http://codereview.chromium.org/246034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_toolbar_view.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_toolbar_view.mm21
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
new file mode 100644
index 0000000..e40607b
--- /dev/null
+++ b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
@@ -0,0 +1,21 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/cocoa/bookmark_bar_toolbar_view.h"
+
+#import "chrome/browser/cocoa/bookmark_bar_controller.h"
+
+@implementation BookmarkBarToolbarView
+
+- (void)drawRect:(NSRect)rect {
+ if ([controller_ drawAsFloatingBar]) {
+ // TODO(erg): Deal with themes. http://crbug.com/17625
+ [[NSColor colorWithDeviceRed:1.0 green:1.0 blue:1.0 alpha:1.0] set];
+ NSRectFill(rect);
+ } else {
+ [super drawRect:rect];
+ }
+}
+
+@end // @implementation BookmarkBarToolbarView