Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/browser/autofill/autocomplete_history_manager.h

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AUTOFILL_AUTOCOMPLETE_HISTORY_MANAGER_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOCOMPLETE_HISTORY_MANAGER_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOCOMPLETE_HISTORY_MANAGER_H_ 6 #define CHROME_BROWSER_AUTOFILL_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 "chrome/browser/api/prefs/pref_member.h" 11 #include "chrome/browser/api/prefs/pref_member.h"
12 #include "chrome/browser/api/webdata/autofill_web_data_service.h" 12 #include "chrome/browser/api/webdata/autofill_web_data_service.h"
13 #include "chrome/browser/api/webdata/web_data_service_consumer.h" 13 #include "chrome/browser/api/webdata/web_data_service_consumer.h"
14 #include "chrome/browser/common/web_contents_user_data.h" 14 #include "chrome/browser/common/web_contents_user_data.h"
15 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
16 16
17 namespace chrome {
18 struct FormData;
19 }
20
17 namespace content { 21 namespace content {
18 class BrowserContext; 22 class BrowserContext;
19 } 23 }
20 24
21 namespace webkit {
22 namespace forms {
23 struct FormData;
24 }
25 }
26
27 class AutofillExternalDelegate; 25 class AutofillExternalDelegate;
28 26
29 // Per-tab Autocomplete history manager. Handles receiving form data 27 // Per-tab Autocomplete history manager. Handles receiving form data
30 // from the renderer and the storing and retrieving of form data 28 // from the renderer and the storing and retrieving of form data
31 // through WebDataServiceBase. 29 // through WebDataServiceBase.
32 class AutocompleteHistoryManager 30 class AutocompleteHistoryManager
33 : public content::WebContentsObserver, 31 : public content::WebContentsObserver,
34 public WebDataServiceConsumer, 32 public WebDataServiceConsumer,
35 public WebContentsUserData<AutocompleteHistoryManager> { 33 public WebContentsUserData<AutocompleteHistoryManager> {
36 public: 34 public:
(...skipping 10 matching lines...) Expand all
47 // Pass-through functions that are called by AutofillManager, after it has 45 // Pass-through functions that are called by AutofillManager, after it has
48 // dispatched a message. 46 // dispatched a message.
49 void OnGetAutocompleteSuggestions( 47 void OnGetAutocompleteSuggestions(
50 int query_id, 48 int query_id,
51 const string16& name, 49 const string16& name,
52 const string16& prefix, 50 const string16& prefix,
53 const std::vector<string16>& autofill_values, 51 const std::vector<string16>& autofill_values,
54 const std::vector<string16>& autofill_labels, 52 const std::vector<string16>& autofill_labels,
55 const std::vector<string16>& autofill_icons, 53 const std::vector<string16>& autofill_icons,
56 const std::vector<int>& autofill_unique_ids); 54 const std::vector<int>& autofill_unique_ids);
57 void OnFormSubmitted(const webkit::forms::FormData& form); 55 void OnFormSubmitted(const chrome::FormData& form);
58 56
59 // Must be public for the external delegate to use. 57 // Must be public for the external delegate to use.
60 void OnRemoveAutocompleteEntry(const string16& name, const string16& value); 58 void OnRemoveAutocompleteEntry(const string16& name, const string16& value);
61 59
62 // Sets our external delegate. 60 // Sets our external delegate.
63 void SetExternalDelegate(AutofillExternalDelegate* delegate); 61 void SetExternalDelegate(AutofillExternalDelegate* delegate);
64 62
65 protected: 63 protected:
66 friend class AutocompleteHistoryManagerTest; 64 friend class AutocompleteHistoryManagerTest;
67 friend class AutofillManagerTest; 65 friend class AutofillManagerTest;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 std::vector<int> autofill_unique_ids_; 100 std::vector<int> autofill_unique_ids_;
103 101
104 // Delegate to perform external processing (display, selection) on 102 // Delegate to perform external processing (display, selection) on
105 // our behalf. Weak. 103 // our behalf. Weak.
106 AutofillExternalDelegate* external_delegate_; 104 AutofillExternalDelegate* external_delegate_;
107 105
108 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); 106 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager);
109 }; 107 };
110 108
111 #endif // CHROME_BROWSER_AUTOFILL_AUTOCOMPLETE_HISTORY_MANAGER_H_ 109 #endif // CHROME_BROWSER_AUTOFILL_AUTOCOMPLETE_HISTORY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698