OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/prefs/pref_member.h" | 11 #include "base/prefs/pref_member.h" |
12 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 12 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
13 #include "components/webdata/common/web_data_service_consumer.h" | 13 #include "components/webdata/common/web_data_service_consumer.h" |
14 | 14 |
15 namespace autofill { | 15 namespace autofill { |
16 | 16 |
17 class AutofillDriver; | 17 class AutofillDriver; |
18 class AutofillExternalDelegate; | 18 class AutofillExternalDelegate; |
19 class AutofillClient; | 19 class AutofillClient; |
20 struct FormData; | 20 struct FormData; |
21 | 21 |
22 // Per-tab Autocomplete history manager. Handles receiving form data | 22 // Per-tab Autocomplete history manager. Handles receiving form data |
23 // from the renderer and the storing and retrieving of form data | 23 // from the renderer and the storing and retrieving of form data |
24 // through WebDataServiceBase. | 24 // through WebDataServiceBase. |
25 class AutocompleteHistoryManager : public WebDataServiceConsumer { | 25 class AutocompleteHistoryManager : public WebDataServiceConsumer { |
26 public: | 26 public: |
27 AutocompleteHistoryManager(AutofillDriver* driver, | 27 AutocompleteHistoryManager(AutofillDriver* driver, |
28 AutofillClient* autofill_client); | 28 AutofillClient* autofill_client); |
29 virtual ~AutocompleteHistoryManager() override; | 29 ~AutocompleteHistoryManager() override; |
30 | 30 |
31 // WebDataServiceConsumer implementation. | 31 // WebDataServiceConsumer implementation. |
32 virtual void OnWebDataServiceRequestDone( | 32 void OnWebDataServiceRequestDone(WebDataServiceBase::Handle h, |
33 WebDataServiceBase::Handle h, const WDTypedResult* result) override; | 33 const WDTypedResult* result) override; |
34 | 34 |
35 // Pass-through functions that are called by AutofillManager, after it has | 35 // Pass-through functions that are called by AutofillManager, after it has |
36 // dispatched a message. | 36 // dispatched a message. |
37 virtual void OnGetAutocompleteSuggestions( | 37 virtual void OnGetAutocompleteSuggestions( |
38 int query_id, | 38 int query_id, |
39 const base::string16& name, | 39 const base::string16& name, |
40 const base::string16& prefix, | 40 const base::string16& prefix, |
41 const std::string& form_control_type, | 41 const std::string& form_control_type, |
42 const std::vector<base::string16>& autofill_values, | 42 const std::vector<base::string16>& autofill_values, |
43 const std::vector<base::string16>& autofill_labels, | 43 const std::vector<base::string16>& autofill_labels, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Whether IPC is sent. | 86 // Whether IPC is sent. |
87 bool send_ipc_; | 87 bool send_ipc_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); | 89 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace autofill | 92 } // namespace autofill |
93 | 93 |
94 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 94 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
OLD | NEW |