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

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

Issue 402077: Adds popups to browser actions, completing the feature.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
« no previous file with comments | « chrome/browser/cocoa/info_bubble_view.h ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/info_bubble_view.mm
===================================================================
--- chrome/browser/cocoa/info_bubble_view.mm (revision 32567)
+++ chrome/browser/cocoa/info_bubble_view.mm (working copy)
@@ -7,21 +7,21 @@
#include "base/logging.h"
#import "third_party/GTM/AppKit/GTMTheme.h"
-namespace {
-// TODO(andybons): confirm constants with UI dudes
-const CGFloat kBubbleCornerRadius = 8.0;
-const CGFloat kBubbleArrowXOffset = 10.0;
-const CGFloat kBubbleArrowWidth = 15.0;
-const CGFloat kBubbleArrowHeight = 8.0;
-}
+// TODO(andybons): confirm constants with UI dudes.
+extern const CGFloat kBubbleArrowHeight = 8.0;
+extern const CGFloat kBubbleArrowWidth = 15.0;
+extern const CGFloat kBubbleArrowXOffset = 10.0;
+extern const CGFloat kBubbleCornerRadius = 8.0;
@implementation InfoBubbleView
@synthesize arrowLocation = arrowLocation_;
+@synthesize bubbleType = bubbleType_;
- (id)initWithFrame:(NSRect)frameRect {
if ((self = [super initWithFrame:frameRect])) {
arrowLocation_ = kTopLeft;
+ bubbleType_ = kGradientInfoBubble;
}
return self;
@@ -61,11 +61,16 @@
arrowStart.y)];
[bezier closePath];
- // Then fill the inside.
- GTMTheme *theme = [GTMTheme defaultTheme];
- NSGradient *gradient = [theme gradientForStyle:GTMThemeStyleToolBar
- state:NO];
- [gradient drawInBezierPath:bezier angle:0.0];
+ // Then fill the inside depending on the type of bubble.
+ if (bubbleType_ == kGradientInfoBubble) {
+ GTMTheme *theme = [GTMTheme defaultTheme];
+ NSGradient *gradient = [theme gradientForStyle:GTMThemeStyleToolBar
+ state:NO];
+ [gradient drawInBezierPath:bezier angle:0.0];
+ } else if (bubbleType_ == kWhiteInfoBubble) {
+ [[NSColor whiteColor] set];
+ [bezier fill];
+ }
}
@end
« no previous file with comments | « chrome/browser/cocoa/info_bubble_view.h ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698