| Index: chrome/browser/cocoa/status_bubble_mac.mm
|
| diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm
|
| index 7b592c6c8135e060c83836342f03bc5e5db78fae..3eef46103bc4c2f84227a1ddd9f5d3d039ae2d7a 100644
|
| --- a/chrome/browser/cocoa/status_bubble_mac.mm
|
| +++ b/chrome/browser/cocoa/status_bubble_mac.mm
|
| @@ -182,11 +182,8 @@ void StatusBubbleMac::Create() {
|
| if (window_)
|
| return;
|
|
|
| - NSRect rect = [parent_ frame];
|
| - rect.size.height = kWindowHeight;
|
| - rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width);
|
| // TODO(avi):fix this for RTL
|
| - window_ = [[NSWindow alloc] initWithContentRect:rect
|
| + window_ = [[NSWindow alloc] initWithContentRect:CalculateWindowFrame()
|
| styleMask:NSBorderlessWindowMask
|
| backing:NSBackingStoreBuffered
|
| defer:YES];
|
| @@ -227,3 +224,18 @@ void StatusBubbleMac::FadeOut() {
|
| [NSAnimationContext endGrouping];
|
| }
|
|
|
| +void StatusBubbleMac::UpdateSizeAndPosition() {
|
| + if (!window_)
|
| + return;
|
| +
|
| + [window_ setFrame:CalculateWindowFrame() display:YES];
|
| +}
|
| +
|
| +NSRect StatusBubbleMac::CalculateWindowFrame() {
|
| + DCHECK(parent_);
|
| +
|
| + NSRect rect = [parent_ frame];
|
| + rect.size.height = kWindowHeight;
|
| + rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width);
|
| + return rect;
|
| +}
|
|
|