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

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

Issue 7740044: Implement fullscreen info bubble on Win and Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win work Created 9 years, 2 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
Index: chrome/browser/ui/cocoa/info_bubble_view.mm
diff --git a/chrome/browser/ui/cocoa/info_bubble_view.mm b/chrome/browser/ui/cocoa/info_bubble_view.mm
index bc1204523148672b9d4c0b19ef34619207309e10..39799ef40e7b94fa2349fd1f1033a1288baead5a 100644
--- a/chrome/browser/ui/cocoa/info_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_view.mm
@@ -21,7 +21,9 @@
- (void)drawRect:(NSRect)rect {
// Make room for the border to be seen.
NSRect bounds = [self bounds];
- bounds.size.height -= info_bubble::kBubbleArrowHeight;
+ if (arrowLocation_ != info_bubble::kNoArrow) {
+ bounds.size.height -= info_bubble::kBubbleArrowHeight;
+ }
NSBezierPath* bezier = [NSBezierPath bezierPath];
rect.size.height -= info_bubble::kBubbleArrowHeight;
@@ -40,6 +42,8 @@
dX = NSWidth(bounds) - info_bubble::kBubbleArrowXOffset -
info_bubble::kBubbleArrowWidth;
break;
+ case info_bubble::kNoArrow:
+ break;
default:
NOTREACHED();
break;
@@ -47,10 +51,12 @@
NSPoint arrowStart = NSMakePoint(NSMinX(bounds), NSMaxY(bounds));
arrowStart.x += dX;
[bezier moveToPoint:NSMakePoint(arrowStart.x, arrowStart.y)];
- [bezier lineToPoint:NSMakePoint(arrowStart.x +
- info_bubble::kBubbleArrowWidth / 2.0,
- arrowStart.y +
- info_bubble::kBubbleArrowHeight)];
+ if (arrowLocation_ != info_bubble::kNoArrow) {
+ [bezier lineToPoint:NSMakePoint(arrowStart.x +
+ info_bubble::kBubbleArrowWidth / 2.0,
+ arrowStart.y +
+ info_bubble::kBubbleArrowHeight)];
+ }
[bezier lineToPoint:NSMakePoint(arrowStart.x + info_bubble::kBubbleArrowWidth,
arrowStart.y)];
[bezier closePath];

Powered by Google App Engine
This is Rietveld 408576698