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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "base/scoped_vector.h" | 12 #include "base/scoped_vector.h" |
13 #include "chrome/browser/autofill/autofill_dialog.h" | 13 #include "chrome/browser/autofill/autofill_dialog.h" |
14 #include "chrome/browser/autofill/autofill_download.h" | 14 #include "chrome/browser/autofill/autofill_download.h" |
15 #include "chrome/browser/autofill/personal_data_manager.h" | 15 #include "chrome/browser/autofill/personal_data_manager.h" |
16 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 16 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
17 | 17 |
| 18 class AutoFillCCInfoBarDelegate; |
18 class AutoFillProfile; | 19 class AutoFillProfile; |
19 class CreditCard; | 20 class CreditCard; |
20 class FormStructure; | 21 class FormStructure; |
21 class PrefService; | 22 class PrefService; |
22 class TabContents; | 23 class TabContents; |
23 | 24 |
24 namespace webkit_glue { | 25 namespace webkit_glue { |
25 struct FormData; | 26 struct FormData; |
26 class FormField; | 27 class FormField; |
27 } // namespace webkit_glue | 28 } // namespace webkit_glue |
(...skipping 21 matching lines...) Expand all Loading... |
49 const std::vector<webkit_glue::FormData>& forms); | 50 const std::vector<webkit_glue::FormData>& forms); |
50 virtual bool GetAutoFillSuggestions(int query_id, | 51 virtual bool GetAutoFillSuggestions(int query_id, |
51 bool form_autofilled, | 52 bool form_autofilled, |
52 const webkit_glue::FormField& field); | 53 const webkit_glue::FormField& field); |
53 virtual bool FillAutoFillFormData(int query_id, | 54 virtual bool FillAutoFillFormData(int query_id, |
54 const webkit_glue::FormData& form, | 55 const webkit_glue::FormData& form, |
55 const string16& value, | 56 const string16& value, |
56 const string16& label); | 57 const string16& label); |
57 virtual void ShowAutoFillDialog(); | 58 virtual void ShowAutoFillDialog(); |
58 | 59 |
| 60 // Called by the AutoFillCCInfoBarDelegate when the user interacts with the |
| 61 // infobar. |
| 62 virtual void OnInfoBarClosed(bool should_save); |
| 63 |
59 // Resets the stored form data. | 64 // Resets the stored form data. |
60 virtual void Reset(); | 65 virtual void Reset(); |
61 | 66 |
62 // AutoFillDownloadManager::Observer implementation: | 67 // AutoFillDownloadManager::Observer implementation: |
63 virtual void OnLoadedAutoFillHeuristics(const std::string& heuristic_xml); | 68 virtual void OnLoadedAutoFillHeuristics(const std::string& heuristic_xml); |
64 virtual void OnUploadedAutoFillHeuristics(const std::string& form_signature); | 69 virtual void OnUploadedAutoFillHeuristics(const std::string& form_signature); |
65 virtual void OnHeuristicsRequestError( | 70 virtual void OnHeuristicsRequestError( |
66 const std::string& form_signature, | 71 const std::string& form_signature, |
67 AutoFillDownloadManager::AutoFillRequestType request_type, | 72 AutoFillDownloadManager::AutoFillRequestType request_type, |
68 int http_error); | 73 int http_error); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 152 |
148 // Handles queries and uploads to AutoFill servers. | 153 // Handles queries and uploads to AutoFill servers. |
149 AutoFillDownloadManager download_manager_; | 154 AutoFillDownloadManager download_manager_; |
150 | 155 |
151 // Our copy of the form data. | 156 // Our copy of the form data. |
152 ScopedVector<FormStructure> form_structures_; | 157 ScopedVector<FormStructure> form_structures_; |
153 | 158 |
154 // The form data the user has submitted. | 159 // The form data the user has submitted. |
155 scoped_ptr<FormStructure> upload_form_structure_; | 160 scoped_ptr<FormStructure> upload_form_structure_; |
156 | 161 |
| 162 // The InfoBar that asks for permission to store credit card information. |
| 163 scoped_ptr<AutoFillCCInfoBarDelegate> cc_infobar_; |
| 164 |
157 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); | 165 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); |
158 }; | 166 }; |
159 | 167 |
160 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 168 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |