| Index: chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm b/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
|
| index 61391112af36c56894d527b07eba15fee6e945f9..274c18841b2c5ac2ecfaace823759b4d4ef6a3cf 100644
|
| --- a/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/download/download_started_animation_mac.mm
|
| @@ -56,7 +56,7 @@ class DownloadAnimationWebObserver : public content::NotificationObserver {
|
| : owner_(owner),
|
| web_contents_(web_contents) {
|
| registrar_.Add(this,
|
| - content::NOTIFICATION_WEB_CONTENTS_HIDDEN,
|
| + content::NOTIFICATION_WEB_CONTENTS_VISIBLITY_CHANGED,
|
| content::Source<WebContents>(web_contents_));
|
| registrar_.Add(this,
|
| content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
|
| @@ -68,6 +68,11 @@ class DownloadAnimationWebObserver : public content::NotificationObserver {
|
| void Observe(int type,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| + if (type == NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
|
| + bool visible = *Details<bool>(details).ptr();
|
| + if (visible)
|
| + return;
|
| + }
|
| // This ends up deleting us.
|
| [owner_ closeAnimation];
|
| }
|
|
|