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/macros.h" | 10 #include "base/macros.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 protected: | 50 protected: |
51 friend class AutofillManagerTest; | 51 friend class AutofillManagerTest; |
52 | 52 |
53 // Sends the stored suggestions plus the new autocomplete results for display | 53 // Sends the stored suggestions plus the new autocomplete results for display |
54 // in the Autofill popup. The parameter may be null if there are no new | 54 // in the Autofill popup. The parameter may be null if there are no new |
55 // autocomplete additions. | 55 // autocomplete additions. |
56 void SendSuggestions(const std::vector<base::string16>* new_results); | 56 void SendSuggestions(const std::vector<base::string16>* new_results); |
57 | 57 |
58 private: | 58 private: |
59 // WebDataServiceConsumer implementation. | 59 // WebDataServiceConsumer implementation. |
60 void OnWebDataServiceRequestDone(WebDataServiceBase::Handle h, | 60 void OnWebDataServiceRequestDone( |
61 const WDTypedResult* result) override; | 61 WebDataServiceBase::Handle h, |
| 62 std::unique_ptr<WDTypedResult> result) override; |
62 | 63 |
63 // Provides driver-level context. Must outlive this object. | 64 // Provides driver-level context. Must outlive this object. |
64 AutofillDriver* driver_; | 65 AutofillDriver* driver_; |
65 scoped_refptr<AutofillWebDataService> database_; | 66 scoped_refptr<AutofillWebDataService> database_; |
66 | 67 |
67 // When the manager makes a request from WebDataServiceBase, the database is | 68 // When the manager makes a request from WebDataServiceBase, the database is |
68 // queried on another thread, we record the query handle until we get called | 69 // queried on another thread, we record the query handle until we get called |
69 // back. | 70 // back. |
70 WebDataServiceBase::Handle pending_query_handle_; | 71 WebDataServiceBase::Handle pending_query_handle_; |
71 int query_id_; | 72 int query_id_; |
72 | 73 |
73 // Delegate to perform external processing (display, selection) on | 74 // Delegate to perform external processing (display, selection) on |
74 // our behalf. Weak. | 75 // our behalf. Weak. |
75 AutofillExternalDelegate* external_delegate_; | 76 AutofillExternalDelegate* external_delegate_; |
76 | 77 |
77 // Delegate to provide whether or not autocomplete functionality is enabled. | 78 // Delegate to provide whether or not autocomplete functionality is enabled. |
78 AutofillClient* const autofill_client_; | 79 AutofillClient* const autofill_client_; |
79 | 80 |
80 // Whether IPC is sent. | 81 // Whether IPC is sent. |
81 bool send_ipc_; | 82 bool send_ipc_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); | 84 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); |
84 }; | 85 }; |
85 | 86 |
86 } // namespace autofill | 87 } // namespace autofill |
87 | 88 |
88 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 89 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
OLD | NEW |