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 content { | 15 namespace content { |
16 class RenderFrameHost; | 16 class RenderFrameHost; |
17 } | 17 } |
18 | 18 |
19 namespace gfx { | 19 namespace gfx { |
20 class Rect; | 20 class Rect; |
21 class RectF; | 21 class RectF; |
22 } | 22 } |
23 | 23 |
24 namespace infobars { | |
25 class InfoBarManager; | |
26 } | |
27 | |
24 class GURL; | 28 class GURL; |
25 class PrefService; | 29 class PrefService; |
26 | 30 |
27 namespace autofill { | 31 namespace autofill { |
28 | 32 |
29 class AutofillPopupDelegate; | 33 class AutofillPopupDelegate; |
30 class AutofillWebDataService; | 34 class AutofillWebDataService; |
31 class CreditCard; | 35 class CreditCard; |
32 class FormStructure; | 36 class FormStructure; |
33 class PersonalDataManager; | 37 class PersonalDataManager; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 // Hides the associated request autocomplete dialog (if it exists). | 77 // Hides the associated request autocomplete dialog (if it exists). |
74 virtual void HideRequestAutocompleteDialog() = 0; | 78 virtual void HideRequestAutocompleteDialog() = 0; |
75 | 79 |
76 // Causes the Autofill settings UI to be shown. | 80 // Causes the Autofill settings UI to be shown. |
77 virtual void ShowAutofillSettings() = 0; | 81 virtual void ShowAutofillSettings() = 0; |
78 | 82 |
79 // A user has attempted to use a masked card. Prompt them for further | 83 // A user has attempted to use a masked card. Prompt them for further |
80 // information to proceed. | 84 // information to proceed. |
81 virtual void ShowUnmaskPrompt() = 0; | 85 virtual void ShowUnmaskPrompt() = 0; |
82 | 86 |
83 // Run |save_card_callback| if the credit card should be imported as personal | |
84 // data. |metric_logger| can be used to log user actions. | |
85 virtual void ConfirmSaveCreditCard( | |
86 const base::Closure& save_card_callback) = 0; | |
87 | |
88 // Returns true if both the platform and the device support scanning credit | 87 // Returns true if both the platform and the device support scanning credit |
89 // cards. Should be called before ScanCreditCard(). | 88 // cards. Should be called before ScanCreditCard(). |
90 virtual bool HasCreditCardScanFeature() = 0; | 89 virtual bool HasCreditCardScanFeature() = 0; |
91 | 90 |
92 // Shows the user interface for scanning a credit card. Invokes the |callback| | 91 // Shows the user interface for scanning a credit card. Invokes the |callback| |
93 // when a credit card is scanned successfully. Should be called only if | 92 // when a credit card is scanned successfully. Should be called only if |
94 // HasCreditCardScanFeature() returns true. | 93 // HasCreditCardScanFeature() returns true. |
95 virtual void ScanCreditCard(const CreditCardScanCallback& callback) = 0; | 94 virtual void ScanCreditCard(const CreditCardScanCallback& callback) = 0; |
96 | 95 |
97 // Causes the dialog for request autocomplete feature to be shown. | 96 // Causes the dialog for request autocomplete feature to be shown. |
(...skipping 28 matching lines...) Expand all Loading... | |
126 content::RenderFrameHost* rfh, | 125 content::RenderFrameHost* rfh, |
127 const std::vector<autofill::FormStructure*>& forms) = 0; | 126 const std::vector<autofill::FormStructure*>& forms) = 0; |
128 | 127 |
129 // Inform the client that the field has been filled. | 128 // Inform the client that the field has been filled. |
130 virtual void DidFillOrPreviewField( | 129 virtual void DidFillOrPreviewField( |
131 const base::string16& autofilled_value, | 130 const base::string16& autofilled_value, |
132 const base::string16& profile_full_name) = 0; | 131 const base::string16& profile_full_name) = 0; |
133 | 132 |
134 // Informs the client that a user gesture has been observed. | 133 // Informs the client that a user gesture has been observed. |
135 virtual void OnFirstUserGestureObserved() = 0; | 134 virtual void OnFirstUserGestureObserved() = 0; |
135 | |
136 // Returns the |InfoBarManager| instance associated with the client. | |
Peter Kasting
2014/12/23 21:20:34
Nit: No ||
Pritam Nikam
2014/12/24 11:16:57
Done.
| |
137 virtual infobars::InfoBarManager* GetInfoBarManager() = 0; | |
Peter Kasting
2014/12/23 21:20:35
Nit: I'd put this up with the other "Gets the X as
Pritam Nikam
2014/12/24 11:16:57
Done.
| |
136 }; | 138 }; |
137 | 139 |
138 } // namespace autofill | 140 } // namespace autofill |
139 | 141 |
140 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 142 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
OLD | NEW |