| Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
|
| index d31cbc0613e6de2a17e50465108cc9e3fe8abb6f..372422842aed3b5af2a3180b438b49f7ef7f1087 100644
|
| --- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
|
| @@ -10,6 +10,7 @@
|
| #import "chrome/browser/ui/cocoa/info_bubble_view.h"
|
| #import "chrome/browser/ui/cocoa/info_bubble_window.h"
|
| #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
|
| +#import "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h"
|
| #import "chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.h"
|
| #import "chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.h"
|
| #import "chrome/browser/ui/cocoa/passwords/manage_passwords_view_controller.h"
|
| @@ -37,6 +38,18 @@
|
| parentWindow:parentWindow
|
| anchoredAt:NSZeroPoint])) {
|
| model_ = model;
|
| + Browser* browser = chrome::FindBrowserWithWindow([self parentWindow]);
|
| +
|
| + bool hasLocationBar =
|
| + browser && browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR);
|
| +
|
| + if (hasLocationBar) {
|
| + BrowserWindowController* controller = [BrowserWindowController
|
| + browserWindowControllerForWindow:parentWindow];
|
| + decoration_ =
|
| + [controller locationBarBridge]->manage_passwords_decoration();
|
| + }
|
| +
|
| [self updateState];
|
| }
|
| return self;
|
| @@ -58,6 +71,10 @@
|
| [super close];
|
| }
|
|
|
| +- (LocationBarDecoration*)decorationForBubble {
|
| + return decoration_;
|
| +}
|
| +
|
| - (void)updateState {
|
| // Find the next view controller.
|
| [currentController_ setDelegate:nil];
|
| @@ -108,8 +125,8 @@
|
| if (hasLocationBar) {
|
| BrowserWindowController* controller = [BrowserWindowController
|
| browserWindowControllerForWindow:[self parentWindow]];
|
| - anchorPoint =
|
| - [controller locationBarBridge]->GetManagePasswordsBubblePoint();
|
| + anchorPoint = [controller locationBarBridge]->GetBubblePointForDecoration(
|
| + decoration_);
|
| arrow = info_bubble::kTopRight;
|
| } else {
|
| // Center the bubble if there's no location bar.
|
|
|