OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 #include <string> | 10 #include <string> |
(...skipping 27 matching lines...) Expand all Loading... |
38 public: | 38 public: |
39 explicit AutoFillManager(TabContents* tab_contents); | 39 explicit AutoFillManager(TabContents* tab_contents); |
40 virtual ~AutoFillManager(); | 40 virtual ~AutoFillManager(); |
41 | 41 |
42 // Registers our browser prefs. | 42 // Registers our browser prefs. |
43 static void RegisterBrowserPrefs(PrefService* prefs); | 43 static void RegisterBrowserPrefs(PrefService* prefs); |
44 | 44 |
45 // Registers our Enable/Disable AutoFill pref. | 45 // Registers our Enable/Disable AutoFill pref. |
46 static void RegisterUserPrefs(PrefService* prefs); | 46 static void RegisterUserPrefs(PrefService* prefs); |
47 | 47 |
| 48 // Returns the TabContents hosting this AutoFillManager. |
| 49 TabContents* tab_contents() const { return tab_contents_; } |
| 50 |
48 // RenderViewHostDelegate::AutoFill implementation: | 51 // RenderViewHostDelegate::AutoFill implementation: |
49 virtual void FormSubmitted(const webkit_glue::FormData& form); | 52 virtual void FormSubmitted(const webkit_glue::FormData& form); |
50 virtual void FormsSeen(const std::vector<webkit_glue::FormData>& forms); | 53 virtual void FormsSeen(const std::vector<webkit_glue::FormData>& forms); |
51 virtual bool GetAutoFillSuggestions(int query_id, | 54 virtual bool GetAutoFillSuggestions(int query_id, |
52 bool form_autofilled, | 55 bool form_autofilled, |
53 const webkit_glue::FormField& field); | 56 const webkit_glue::FormField& field); |
54 virtual bool FillAutoFillFormData(int query_id, | 57 virtual bool FillAutoFillFormData(int query_id, |
55 const webkit_glue::FormData& form, | 58 const webkit_glue::FormData& form, |
56 const string16& value, | 59 const string16& value, |
57 const string16& label, | 60 const string16& label, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 199 |
197 friend class AutoFillManagerTest; | 200 friend class AutoFillManagerTest; |
198 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm); | 201 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm); |
199 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillNonBillingFormSemicolon); | 202 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillNonBillingFormSemicolon); |
200 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillBillFormSemicolon); | 203 FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillBillFormSemicolon); |
201 | 204 |
202 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); | 205 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); |
203 }; | 206 }; |
204 | 207 |
205 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 208 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |