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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 17893010: In components/autofill, move notification handling into content driver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 7 years, 6 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: components/autofill/core/browser/autofill_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index 29568c2521fd5cd04ae1096d2bba0a3fe874a48b..f8280fb99d0b81b3a8c612e3b24fd5a8ec6779b6 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -8,10 +8,6 @@
#include "components/autofill/core/browser/autocomplete_history_manager.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/common/autofill_messages.h"
-#include "content/public/browser/navigation_controller.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_source.h"
-#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "grit/component_strings.h"
@@ -40,15 +36,6 @@ AutofillExternalDelegate::AutofillExternalDelegate(
registered_keyboard_listener_with_(NULL),
weak_ptr_factory_(this) {
DCHECK(autofill_manager);
-
- registrar_.Add(this,
- content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
- content::Source<content::WebContents>(web_contents));
- registrar_.Add(
- this,
- content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<content::NavigationController>(
- &(web_contents->GetController())));
}
AutofillExternalDelegate::~AutofillExternalDelegate() {}
@@ -375,18 +362,4 @@ void AutofillExternalDelegate::InsertDataListValues(
data_list_unique_ids_.end());
}
-void AutofillExternalDelegate::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
- if (!*content::Details<bool>(details).ptr())
- autofill_manager_->delegate()->HideAutofillPopup();
- } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
- autofill_manager_->delegate()->HideAutofillPopup();
- } else {
- NOTREACHED();
- }
-}
-
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698