| Index: chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
|
| diff --git a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
|
| index c2781f8d25cdeecb0e9e48c08a42bdac1a9c9642..4a519d58c5b4153cf75871da81bcdde5dfa125a8 100644
|
| --- a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
|
| +++ b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc
|
| @@ -9,6 +9,7 @@
|
| #include <gtk/gtk.h>
|
|
|
| #include "base/message_loop.h"
|
| +#include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/notification_source.h"
|
| @@ -106,7 +107,7 @@ DownloadStartedAnimationGtk::DownloadStartedAnimationGtk(
|
|
|
| registrar_.Add(
|
| this,
|
| - content::NOTIFICATION_WEB_CONTENTS_HIDDEN,
|
| + content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
|
| content::Source<WebContents>(web_contents_));
|
| registrar_.Add(
|
| this,
|
| @@ -162,7 +163,7 @@ void DownloadStartedAnimationGtk::Close() {
|
|
|
| registrar_.Remove(
|
| this,
|
| - content::NOTIFICATION_WEB_CONTENTS_HIDDEN,
|
| + content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
|
| content::Source<WebContents>(web_contents_));
|
| registrar_.Remove(
|
| this,
|
| @@ -196,6 +197,11 @@ void DownloadStartedAnimationGtk::Observe(
|
| int type,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| + if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
|
| + bool visible = *content::Details<bool>(details).ptr();
|
| + if (visible)
|
| + return;
|
| + }
|
| Close();
|
| }
|
|
|
|
|