| Index: chrome/browser/autofill/autofill_manager.h
|
| diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
|
| index 80c4ce0434aa040f3848d35e059d47887ff8012f..8272cfaa037477240aa166026fd10db9a6ae44df 100644
|
| --- a/chrome/browser/autofill/autofill_manager.h
|
| +++ b/chrome/browser/autofill/autofill_manager.h
|
| @@ -23,6 +23,7 @@
|
| #include "chrome/browser/autofill/form_structure.h"
|
| #include "content/browser/tab_contents/tab_contents_observer.h"
|
|
|
| +class AutofillExternalDelegate;
|
| class AutofillField;
|
| class AutofillProfile;
|
| class AutofillMetrics;
|
| @@ -80,6 +81,11 @@ class AutofillManager : public TabContentsObserver,
|
| // Reset cache.
|
| void Reset();
|
|
|
| + // Set our external delegate.
|
| + void SetExternalDelegate(AutofillExternalDelegate* delegate) {
|
| + external_delegate_ = delegate;
|
| + }
|
| +
|
| protected:
|
| // For tests:
|
|
|
| @@ -110,6 +116,17 @@ class AutofillManager : public TabContentsObserver,
|
| int PackGUIDs(const GUIDPair& cc_guid, const GUIDPair& profile_guid) const;
|
| void UnpackGUIDs(int id, GUIDPair* cc_guid, GUIDPair* profile_guid) const;
|
|
|
| + // Called from our external delegate so it cannot be private.
|
| + void OnFillAutoFillFormData(int query_id,
|
| + const webkit_glue::FormData& form,
|
| + const webkit_glue::FormField& field,
|
| + int unique_id);
|
| +
|
| + // Exposed for testing.
|
| + AutofillExternalDelegate* external_delegate() {
|
| + return external_delegate_;
|
| + }
|
| +
|
| private:
|
| void OnFormSubmitted(const webkit_glue::FormData& form,
|
| const base::TimeTicks& timestamp);
|
| @@ -275,6 +292,10 @@ class AutofillManager : public TabContentsObserver,
|
| mutable std::map<GUIDPair, int> guid_id_map_;
|
| mutable std::map<int, GUIDPair> id_guid_map_;
|
|
|
| + // Delegate to perform external processing (display, selection) on
|
| + // our behalf. Weak.
|
| + AutofillExternalDelegate* external_delegate_;
|
| +
|
| friend class AutofillManagerTest;
|
| friend class FormStructureBrowserTest;
|
| FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
|
| @@ -289,6 +310,8 @@ class AutofillManager : public TabContentsObserver,
|
| FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure);
|
| FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId);
|
| FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, SaneMetricsWithCacheMismatch);
|
| + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestExternalDelegate);
|
| + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestTabContents);
|
| FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest,
|
| UserHappinessFormLoadAndSubmission);
|
| FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction);
|
|
|