| Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm
|
| index edd89415c1601562f9d4260a267864059f77be7c..8c871a9b6d9b6df94372684c5ac80731118dc133 100644
|
| --- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm
|
| @@ -45,7 +45,6 @@ ManagePasswordsBubbleCocoa::ManagePasswordsBubbleCocoa(
|
| ManagePasswordsIcon* icon)
|
| : model_(webContents, displayReason),
|
| icon_(icon),
|
| - closing_(false),
|
| controller_(nil),
|
| webContents_(webContents),
|
| bridge_(nil) {
|
| @@ -88,11 +87,17 @@ void ManagePasswordsBubbleCocoa::Show(bool user_action) {
|
| object:[controller_ window]];
|
| }
|
|
|
| -void ManagePasswordsBubbleCocoa::Close() {
|
| - if (!closing_) {
|
| - closing_ = true;
|
| - [controller_ close];
|
| +void ManagePasswordsBubbleCocoa::Close(bool no_animation) {
|
| + if (no_animation) {
|
| + InfoBubbleWindow* window = base::mac::ObjCCastStrict<InfoBubbleWindow>(
|
| + [controller_ window]);
|
| + [window setAllowedAnimations:info_bubble::kAnimateNone];
|
| }
|
| + [controller_ close];
|
| +}
|
| +
|
| +void ManagePasswordsBubbleCocoa::Close() {
|
| + Close(false);
|
| }
|
|
|
| void ManagePasswordsBubbleCocoa::OnClose() {
|
| @@ -105,10 +110,7 @@ void ManagePasswordsBubbleCocoa::Show(content::WebContents* webContents,
|
| if (bubble_) {
|
| // The bubble is currently shown. It's to be reopened with the new content.
|
| // Disable closing animation so that it's destroyed immediately.
|
| - InfoBubbleWindow* window = base::mac::ObjCCastStrict<InfoBubbleWindow>(
|
| - [bubble_->controller_ window]);
|
| - [window setAllowedAnimations:info_bubble::kAnimateNone];
|
| - bubble_->Close();
|
| + bubble_->Close(true);
|
| }
|
| DCHECK(!bubble_);
|
|
|
|
|