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

Unified Diff: chrome/browser/autofill/autofill_popup_view.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: 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
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_popup_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_popup_view.cc
diff --git a/chrome/browser/autofill/autofill_popup_view.cc b/chrome/browser/autofill/autofill_popup_view.cc
index 0a146f5308a410a51698bcef04156a7ee899dac2..bead013e617235da4a0c86f122090ca2171212db 100644
--- a/chrome/browser/autofill/autofill_popup_view.cc
+++ b/chrome/browser/autofill/autofill_popup_view.cc
@@ -49,7 +49,7 @@ AutofillPopupView::AutofillPopupView(
return;
registrar_.Add(this,
- content::NOTIFICATION_WEB_CONTENTS_HIDDEN,
+ content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
content::Source<content::WebContents>(web_contents));
registrar_.Add(
this,
@@ -196,7 +196,10 @@ bool AutofillPopupView::HasAutofillEntries() {
void AutofillPopupView::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == content::NOTIFICATION_WEB_CONTENTS_HIDDEN
- || type == content::NOTIFICATION_NAV_ENTRY_COMMITTED)
+ if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
+ if (!*content::Details<bool>(details).ptr())
+ Hide();
+ } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
Hide();
+ }
}
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_popup_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698