OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 | 13 |
14 class AutofillField; | 14 class AutofillField; |
15 class AutofillManager; | 15 class AutofillManager; |
16 class AutofillProfile; | 16 class AutofillProfile; |
17 class CreditCard; | 17 class CreditCard; |
18 class FormStructure; | 18 class FormStructure; |
19 class GURL; | 19 class GURL; |
20 | 20 |
21 struct FormData; | 21 struct FormData; |
22 struct FormFieldData; | 22 struct FormFieldData; |
23 | 23 |
24 namespace autofill { | |
25 struct WebElementDescriptor; | |
26 } | |
27 | |
28 namespace content { | 24 namespace content { |
29 struct SSLStatus; | 25 struct SSLStatus; |
30 } | 26 } |
31 | 27 |
| 28 namespace autofill { |
| 29 |
| 30 struct WebElementDescriptor; |
| 31 |
32 class AutocheckoutManager { | 32 class AutocheckoutManager { |
33 public: | 33 public: |
34 explicit AutocheckoutManager(AutofillManager* autofill_manager); | 34 explicit AutocheckoutManager(AutofillManager* autofill_manager); |
35 | 35 |
36 // Sets proceed element to use when filling forms on the current page. | 36 // Sets proceed element to use when filling forms on the current page. |
37 void SetProceedElementDescriptor( | 37 void SetProceedElementDescriptor(const WebElementDescriptor& proceed); |
38 const autofill::WebElementDescriptor& proceed); | |
39 | 38 |
40 // Fill all the forms seen by the Autofill manager with the information | 39 // Fill all the forms seen by the Autofill manager with the information |
41 // gathered from the requestAutocomplete dialog. | 40 // gathered from the requestAutocomplete dialog. |
42 void FillForms(); | 41 void FillForms(); |
43 | 42 |
44 // Show the requestAutocomplete dialog. | 43 // Show the requestAutocomplete dialog. |
45 virtual void ShowAutocheckoutDialog(const GURL& frame_url, | 44 virtual void ShowAutocheckoutDialog(const GURL& frame_url, |
46 const content::SSLStatus& ssl_status); | 45 const content::SSLStatus& ssl_status); |
47 | 46 |
48 virtual ~AutocheckoutManager(); | 47 virtual ~AutocheckoutManager(); |
(...skipping 12 matching lines...) Expand all Loading... |
61 string16 cvv_; | 60 string16 cvv_; |
62 | 61 |
63 // Profile built using the data supplied by requestAutocomplete dialog. | 62 // Profile built using the data supplied by requestAutocomplete dialog. |
64 scoped_ptr<AutofillProfile> profile_; | 63 scoped_ptr<AutofillProfile> profile_; |
65 | 64 |
66 // Credit card built using the data supplied by requestAutocomplete dialog. | 65 // Credit card built using the data supplied by requestAutocomplete dialog. |
67 scoped_ptr<CreditCard> credit_card_; | 66 scoped_ptr<CreditCard> credit_card_; |
68 | 67 |
69 // Descriptor of the web element to click in order to proceed in the | 68 // Descriptor of the web element to click in order to proceed in the |
70 // Autocheckout flow. | 69 // Autocheckout flow. |
71 scoped_ptr<autofill::WebElementDescriptor> proceed_descriptor_; | 70 scoped_ptr<WebElementDescriptor> proceed_descriptor_; |
72 | 71 |
73 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_; | 72 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_; |
74 | 73 |
75 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager); | 74 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager); |
76 }; | 75 }; |
77 | 76 |
| 77 } // namespace autofill |
| 78 |
78 #endif // CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ | 79 #endif // CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ |
OLD | NEW |