| Index: chrome/browser/autocomplete_history_manager.h
|
| diff --git a/chrome/browser/autocomplete_history_manager.h b/chrome/browser/autocomplete_history_manager.h
|
| index 4f8b8f3c7b35fb7de92d8201e45fc99e63c33686..f3923d249e231fb04856d923582fbc70dffb50e5 100644
|
| --- a/chrome/browser/autocomplete_history_manager.h
|
| +++ b/chrome/browser/autocomplete_history_manager.h
|
| @@ -8,6 +8,7 @@
|
|
|
| #include <vector>
|
|
|
| +#include "base/gtest_prod_util.h"
|
| #include "chrome/browser/prefs/pref_member.h"
|
| #include "chrome/browser/webdata/web_data_service.h"
|
| #include "content/browser/tab_contents/tab_contents_observer.h"
|
| @@ -16,6 +17,7 @@ namespace webkit_glue {
|
| struct FormData;
|
| } // namespace webkit_glue
|
|
|
| +class AutofillExternalDelegate;
|
| class Profile;
|
| class TabContents;
|
|
|
| @@ -46,9 +48,16 @@ class AutocompleteHistoryManager : public TabContentsObserver,
|
| const std::vector<int>& autofill_unique_ids);
|
| void OnFormSubmitted(const webkit_glue::FormData& form);
|
|
|
| + // Sets our external delegate.
|
| + void SetExternalDelegate(AutofillExternalDelegate* delegate) {
|
| + external_delegate_ = delegate;
|
| + }
|
| +
|
| protected:
|
| friend class AutocompleteHistoryManagerTest;
|
| friend class AutofillManagerTest;
|
| + FRIEND_TEST_ALL_PREFIXES(AutocompleteHistoryManagerTest, ExternalDelegate);
|
| + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, TestTabContents);
|
|
|
| // For tests.
|
| AutocompleteHistoryManager(TabContents* tab_contents,
|
| @@ -58,6 +67,11 @@ class AutocompleteHistoryManager : public TabContentsObserver,
|
| void SendSuggestions(const std::vector<string16>* suggestions);
|
| void CancelPendingQuery();
|
|
|
| + // Exposed for testing.
|
| + AutofillExternalDelegate* external_delegate() {
|
| + return external_delegate_;
|
| + }
|
| +
|
| private:
|
| void OnRemoveAutocompleteEntry(const string16& name, const string16& value);
|
|
|
| @@ -76,6 +90,10 @@ class AutocompleteHistoryManager : public TabContentsObserver,
|
| std::vector<string16> autofill_icons_;
|
| std::vector<int> autofill_unique_ids_;
|
|
|
| + // Delegate to perform external processing (display, selection) on
|
| + // our behalf. Weak.
|
| + AutofillExternalDelegate* external_delegate_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager);
|
| };
|
|
|
|
|