Chromium Code Reviews| 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..8467ae506740cb43b30cf72aeaf02c56fda625d4 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,13 @@ 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::OnClose() { |
| @@ -105,10 +106,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); |
|
vabr (Chromium)
2016/07/28 16:59:12
If this is the only callsite, then why don't you h
vasilii
2016/07/28 17:11:37
It's not. There is also ManagePasswordsDecoration:
vabr (Chromium)
2016/07/28 17:14:17
But that one contains a Close call without argumen
|
| } |
| DCHECK(!bubble_); |