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

Unified Diff: chrome/browser/ui/views/download/download_started_animation_views.cc

Issue 10411033: Browser Plugin: WebContents should notify when it's restored (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed a test DCHECK 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/views/download/download_started_animation_views.cc
diff --git a/chrome/browser/ui/views/download/download_started_animation_views.cc b/chrome/browser/ui/views/download/download_started_animation_views.cc
index fd4d9c31be0a6076fa57cc4aacb5c5699b818a47..cb31deeca0779c17ef117ab447e98b0c33743249 100644
--- a/chrome/browser/ui/views/download/download_started_animation_views.cc
+++ b/chrome/browser/ui/views/download/download_started_animation_views.cc
@@ -96,7 +96,7 @@ DownloadStartedAnimationWin::DownloadStartedAnimationWin(
registrar_.Add(
this,
- content::NOTIFICATION_WEB_CONTENTS_HIDDEN,
+ content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
content::Source<WebContents>(web_contents_));
registrar_.Add(
this,
@@ -171,6 +171,11 @@ void DownloadStartedAnimationWin::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;
+ }
Close();
}

Powered by Google App Engine
This is Rietveld 408576698