OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class Rect; | 16 class Rect; |
17 class RectF; | 17 class RectF; |
18 } | 18 } |
19 | 19 |
20 class GURL; | 20 class GURL; |
21 class PrefService; | 21 class PrefService; |
22 | 22 |
23 namespace autofill { | 23 namespace autofill { |
24 | 24 |
25 class AutofillDriver; | |
25 class AutofillMetrics; | 26 class AutofillMetrics; |
26 class AutofillPopupDelegate; | 27 class AutofillPopupDelegate; |
27 class AutofillWebDataService; | 28 class AutofillWebDataService; |
28 class CreditCard; | 29 class CreditCard; |
29 class FormStructure; | 30 class FormStructure; |
30 class PersonalDataManager; | 31 class PersonalDataManager; |
31 struct FormData; | 32 struct FormData; |
32 | 33 |
33 // A client interface that needs to be supplied to the Autofill component by the | 34 // A client interface that needs to be supplied to the Autofill component by the |
34 // embedder. | 35 // embedder. |
(...skipping 29 matching lines...) Expand all Loading... | |
64 | 65 |
65 // Hides the associated request autocomplete dialog (if it exists). | 66 // Hides the associated request autocomplete dialog (if it exists). |
66 virtual void HideRequestAutocompleteDialog() = 0; | 67 virtual void HideRequestAutocompleteDialog() = 0; |
67 | 68 |
68 // Causes the Autofill settings UI to be shown. | 69 // Causes the Autofill settings UI to be shown. |
69 virtual void ShowAutofillSettings() = 0; | 70 virtual void ShowAutofillSettings() = 0; |
70 | 71 |
71 // Run |save_card_callback| if the credit card should be imported as personal | 72 // Run |save_card_callback| if the credit card should be imported as personal |
72 // data. |metric_logger| can be used to log user actions. | 73 // data. |metric_logger| can be used to log user actions. |
73 virtual void ConfirmSaveCreditCard( | 74 virtual void ConfirmSaveCreditCard( |
75 const AutofillDriver& autofill_driver, | |
Ilya Sherman
2014/11/21 18:41:53
Please pass this as a pointer, since you plan to k
Ilya Sherman
2014/11/21 18:41:53
Please document the |autofill_driver|, including l
Pritam Nikam
2014/11/24 14:45:54
Done.
| |
74 const AutofillMetrics& metric_logger, | 76 const AutofillMetrics& metric_logger, |
75 const base::Closure& save_card_callback) = 0; | 77 const base::Closure& save_card_callback) = 0; |
76 | 78 |
77 // Causes the dialog for request autocomplete feature to be shown. | 79 // Causes the dialog for request autocomplete feature to be shown. |
78 virtual void ShowRequestAutocompleteDialog( | 80 virtual void ShowRequestAutocompleteDialog( |
79 const FormData& form, | 81 const FormData& form, |
80 const GURL& source_url, | 82 const GURL& source_url, |
81 const ResultCallback& callback) = 0; | 83 const ResultCallback& callback) = 0; |
82 | 84 |
83 // Shows an Autofill popup with the given |values|, |labels|, |icons|, and | 85 // Shows an Autofill popup with the given |values|, |labels|, |icons|, and |
(...skipping 26 matching lines...) Expand all Loading... | |
110 | 112 |
111 // Inform the client that the field has been filled. | 113 // Inform the client that the field has been filled. |
112 virtual void DidFillOrPreviewField( | 114 virtual void DidFillOrPreviewField( |
113 const base::string16& autofilled_value, | 115 const base::string16& autofilled_value, |
114 const base::string16& profile_full_name) = 0; | 116 const base::string16& profile_full_name) = 0; |
115 }; | 117 }; |
116 | 118 |
117 } // namespace autofill | 119 } // namespace autofill |
118 | 120 |
119 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 121 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
OLD | NEW |