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

Unified Diff: chrome/browser/cocoa/bookmark_bar_toolbar_view.mm

Issue 384105: Mac: Animate the bookmark bar showing/hiding. (Closed)
Patch Set: Comments added per rohitrao's review. Created 11 years, 1 month 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
Index: chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
diff --git a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
index 119192e80ccabf5cbd87ff8adc728448bf87ad8d..1a9b7ce39574d4b7631203fc464af9e48bd8813d 100644
--- a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
+++ b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
@@ -17,18 +17,18 @@
const CGFloat kBorderRadius = 3.0;
@interface BookmarkBarToolbarView (Private)
-- (void)drawRectAsFloating:(NSRect)rect;
+- (void)drawRectAsBubble:(NSRect)rect;
@end
@implementation BookmarkBarToolbarView
- (BOOL)isOpaque {
- return [controller_ drawAsFloatingBar];
+ return [controller_ isShownAsDetachedBar];
}
- (void)drawRect:(NSRect)rect {
- if ([controller_ drawAsFloatingBar]) {
- [self drawRectAsFloating:rect];
+ if ([controller_ isShownAsDetachedBar]) {
+ [self drawRectAsBubble:rect];
} else {
NSPoint phase = [self gtm_themePatternPhase];
[[NSGraphicsContext currentContext] setPatternPhase:phase];
@@ -36,7 +36,7 @@ const CGFloat kBorderRadius = 3.0;
}
}
-- (void)drawRectAsFloating:(NSRect)rect {
+- (void)drawRectAsBubble:(NSRect)rect {
NSRect bounds = [self bounds];
ThemeProvider* themeProvider = [controller_ themeProvider];
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_toolbar_view.h ('k') | chrome/browser/cocoa/bookmark_bar_toolbar_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698