Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3691)

Unified Diff: chrome/browser/ui/cocoa/download/download_started_animation_mac.mm

Issue 10411033: Browser Plugin: WebContents should notify when it's restored (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with ToT Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c4bfaebbbc4bf51b3072b5f87f31bff4302f98b3 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_VISIBILITY_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 == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
+ bool visible = *content::Details<bool>(details).ptr();
+ if (visible)
+ return;
+ }
// This ends up deleting us.
[owner_ closeAnimation];
}

Powered by Google App Engine
This is Rietveld 408576698