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

Unified Diff: chrome/browser/autofill/autofill_manager.h

Issue 3226001: Detecting form locale (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Unit test for top websites Created 10 years, 3 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/autofill/autofill_manager.h
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 5ee7b097a642745f9873169963032f1536f1901a..a9f175603e36431170c23b93c70beb76c2247f0a 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -15,13 +15,19 @@
#include "base/scoped_vector.h"
#include "chrome/browser/autofill/autofill_dialog.h"
#include "chrome/browser/autofill/autofill_download.h"
+#include "chrome/browser/autofill/autofill_locale_model.h"
#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
class AutoFillCCInfoBarDelegate;
class AutoFillProfile;
class CreditCard;
class FormStructure;
+class NotificationDetails;
+class NotificationSource;
+class NotificationType;
class PrefService;
class TabContents;
@@ -36,7 +42,8 @@ extern const char* kAutoFillLearnMoreUrl;
// Manages saving and restoring the user's personal information entered into web
// forms.
class AutoFillManager : public RenderViewHostDelegate::AutoFill,
- public AutoFillDownloadManager::Observer {
+ public AutoFillDownloadManager::Observer,
+ public NotificationObserver {
public:
explicit AutoFillManager(TabContents* tab_contents);
virtual ~AutoFillManager();
@@ -76,6 +83,11 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
AutoFillDownloadManager::AutoFillRequestType request_type,
int http_error);
+ // NotificationObserver implementation:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
// Returns the value of the AutoFillEnabled pref.
virtual bool IsAutoFillEnabled() const;
@@ -99,6 +111,10 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
personal_data_ = personal_data;
}
+ const ScopedVector<FormStructure>* form_structures() const {
+ return &form_structures_;
+ }
+
private:
// Returns a list of values from the stored profiles that match |type| and the
// value of |field| and returns the labels of the matching profiles. |labels|
@@ -195,6 +211,13 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
// Handles queries and uploads to AutoFill servers.
AutoFillDownloadManager download_manager_;
+ // Handles registration and unregistration for tab language detection
+ // notifications.
+ NotificationRegistrar notification_registrar_;
+
+ // A locale model for the forms in this tab.
+ AutoFillLocaleModel locale_model_;
+
// Should be set to true in AutoFillManagerTest and other tests, false in
// AutoFillDownloadManagerTest and in non-test environment. Is false by
// default.
« no previous file with comments | « chrome/browser/autofill/autofill_locale_model_unittest.cc ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698