Index: components/autofill/browser/autocomplete_history_manager.h |
diff --git a/components/autofill/browser/autocomplete_history_manager.h b/components/autofill/browser/autocomplete_history_manager.h |
index 9a55fa44b7dfd4cde12625f850f5c9b5f11ab38a..03ab8cd0c7448aa1f2431eb9a58fe5834377bfa8 100644 |
--- a/components/autofill/browser/autocomplete_history_manager.h |
+++ b/components/autofill/browser/autocomplete_history_manager.h |
@@ -11,29 +11,26 @@ |
#include "base/prefs/pref_member.h" |
#include "components/autofill/browser/webdata/autofill_webdata_service.h" |
#include "components/webdata/common/web_data_service_consumer.h" |
-#include "content/public/browser/web_contents_observer.h" |
namespace content { |
class BrowserContext; |
+class WebContents; |
} |
namespace autofill { |
+class AutofillDriver; |
class AutofillExternalDelegate; |
struct FormData; |
// Per-tab Autocomplete history manager. Handles receiving form data |
// from the renderer and the storing and retrieving of form data |
// through WebDataServiceBase. |
-class AutocompleteHistoryManager : public content::WebContentsObserver, |
- public WebDataServiceConsumer { |
+class AutocompleteHistoryManager : public WebDataServiceConsumer { |
public: |
- explicit AutocompleteHistoryManager(content::WebContents* web_contents); |
+ explicit AutocompleteHistoryManager(AutofillDriver* driver); |
virtual ~AutocompleteHistoryManager(); |
- // content::WebContentsObserver implementation. |
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
- |
// WebDataServiceConsumer implementation. |
virtual void OnWebDataServiceRequestDone( |
WebDataServiceBase::Handle h, |
@@ -60,6 +57,7 @@ class AutocompleteHistoryManager : public content::WebContentsObserver, |
protected: |
friend class AutofillManagerTest; |
+ FRIEND_TEST_ALL_PREFIXES(AutocompleteHistoryManagerTest, ExternalDelegate); |
// Sends the given |suggestions| for display in the Autofill popup. |
void SendSuggestions(const std::vector<base::string16>* suggestions); |
@@ -69,6 +67,7 @@ class AutocompleteHistoryManager : public content::WebContentsObserver, |
void CancelPendingQuery(); |
content::BrowserContext* browser_context_; |
+ AutofillDriver* driver_; |
scoped_refptr<AutofillWebDataService> autofill_data_; |
BooleanPrefMember autofill_enabled_; |
@@ -87,6 +86,9 @@ class AutocompleteHistoryManager : public content::WebContentsObserver, |
// our behalf. Weak. |
AutofillExternalDelegate* external_delegate_; |
+ // Used by tests to disable sending IPC. |
+ bool send_IPC_; |
Ilya Sherman
2013/06/12 00:07:46
nit: If you keep this variable, it should use hack
blundell
2013/06/12 16:29:37
Done. It was a bug that the variable wasn't used;
|
+ |
DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); |
}; |