OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // Per-tab Autocomplete history manager. Handles receiving form data from the | 24 // Per-tab Autocomplete history manager. Handles receiving form data from the |
25 // renderer and the storing and retrieving of form data through WebDataService. | 25 // renderer and the storing and retrieving of form data through WebDataService. |
26 class AutocompleteHistoryManager : public TabContentsObserver, | 26 class AutocompleteHistoryManager : public TabContentsObserver, |
27 public WebDataServiceConsumer { | 27 public WebDataServiceConsumer { |
28 public: | 28 public: |
29 explicit AutocompleteHistoryManager(TabContents* tab_contents); | 29 explicit AutocompleteHistoryManager(TabContents* tab_contents); |
30 virtual ~AutocompleteHistoryManager(); | 30 virtual ~AutocompleteHistoryManager(); |
31 | 31 |
32 // TabContentsObserver implementation. | 32 // TabContentsObserver implementation. |
33 virtual bool OnMessageReceived(const IPC::Message& message); | 33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
34 | 34 |
35 // WebDataServiceConsumer implementation. | 35 // WebDataServiceConsumer implementation. |
36 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 36 virtual void OnWebDataServiceRequestDone( |
37 const WDTypedResult* result); | 37 WebDataService::Handle h, |
| 38 const WDTypedResult* result) OVERRIDE; |
38 | 39 |
39 // Pass-through functions that are called by AutofillManager, after it has | 40 // Pass-through functions that are called by AutofillManager, after it has |
40 // dispatched a message. | 41 // dispatched a message. |
41 void OnGetAutocompleteSuggestions( | 42 void OnGetAutocompleteSuggestions( |
42 int query_id, | 43 int query_id, |
43 const string16& name, | 44 const string16& name, |
44 const string16& prefix, | 45 const string16& prefix, |
45 const std::vector<string16>& autofill_values, | 46 const std::vector<string16>& autofill_values, |
46 const std::vector<string16>& autofill_labels, | 47 const std::vector<string16>& autofill_labels, |
47 const std::vector<string16>& autofill_icons, | 48 const std::vector<string16>& autofill_icons, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 std::vector<int> autofill_unique_ids_; | 90 std::vector<int> autofill_unique_ids_; |
90 | 91 |
91 // Delegate to perform external processing (display, selection) on | 92 // Delegate to perform external processing (display, selection) on |
92 // our behalf. Weak. | 93 // our behalf. Weak. |
93 AutofillExternalDelegate* external_delegate_; | 94 AutofillExternalDelegate* external_delegate_; |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); | 96 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); |
96 }; | 97 }; |
97 | 98 |
98 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 99 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
OLD | NEW |