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 class GURL; | 24 class GURL; |
25 class PrefService; | 25 class PrefService; |
26 | 26 |
27 namespace autofill { | 27 namespace autofill { |
28 | 28 |
29 class AutofillDriver; | |
29 class AutofillPopupDelegate; | 30 class AutofillPopupDelegate; |
30 class AutofillWebDataService; | 31 class AutofillWebDataService; |
31 class CreditCard; | 32 class CreditCard; |
32 class FormStructure; | 33 class FormStructure; |
33 class PersonalDataManager; | 34 class PersonalDataManager; |
34 struct FormData; | 35 struct FormData; |
35 struct Suggestion; | 36 struct Suggestion; |
36 | 37 |
37 // A client interface that needs to be supplied to the Autofill component by the | 38 // A client interface that needs to be supplied to the Autofill component by the |
38 // embedder. | 39 // embedder. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 virtual void HideRequestAutocompleteDialog() = 0; | 75 virtual void HideRequestAutocompleteDialog() = 0; |
75 | 76 |
76 // Causes the Autofill settings UI to be shown. | 77 // Causes the Autofill settings UI to be shown. |
77 virtual void ShowAutofillSettings() = 0; | 78 virtual void ShowAutofillSettings() = 0; |
78 | 79 |
79 // A user has attempted to use a masked card. Prompt them for further | 80 // A user has attempted to use a masked card. Prompt them for further |
80 // information to proceed. | 81 // information to proceed. |
81 virtual void ShowUnmaskPrompt() = 0; | 82 virtual void ShowUnmaskPrompt() = 0; |
82 | 83 |
83 // Run |save_card_callback| if the credit card should be imported as personal | 84 // 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 // data. |autofill_driver| abstracts call to open url. |metric_logger| can be |
Peter Kasting
2014/12/29 22:24:30
The added sentence here is meaningless: what call
Pritam Nikam
2014/12/30 13:22:14
Done.
| |
86 // used to log user actions. | |
85 virtual void ConfirmSaveCreditCard( | 87 virtual void ConfirmSaveCreditCard( |
88 AutofillDriver* autofill_driver, | |
86 const base::Closure& save_card_callback) = 0; | 89 const base::Closure& save_card_callback) = 0; |
87 | 90 |
88 // Returns true if both the platform and the device support scanning credit | 91 // Returns true if both the platform and the device support scanning credit |
89 // cards. Should be called before ScanCreditCard(). | 92 // cards. Should be called before ScanCreditCard(). |
90 virtual bool HasCreditCardScanFeature() = 0; | 93 virtual bool HasCreditCardScanFeature() = 0; |
91 | 94 |
92 // Shows the user interface for scanning a credit card. Invokes the |callback| | 95 // 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 | 96 // when a credit card is scanned successfully. Should be called only if |
94 // HasCreditCardScanFeature() returns true. | 97 // HasCreditCardScanFeature() returns true. |
95 virtual void ScanCreditCard(const CreditCardScanCallback& callback) = 0; | 98 virtual void ScanCreditCard(const CreditCardScanCallback& callback) = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 const base::string16& autofilled_value, | 134 const base::string16& autofilled_value, |
132 const base::string16& profile_full_name) = 0; | 135 const base::string16& profile_full_name) = 0; |
133 | 136 |
134 // Informs the client that a user gesture has been observed. | 137 // Informs the client that a user gesture has been observed. |
135 virtual void OnFirstUserGestureObserved() = 0; | 138 virtual void OnFirstUserGestureObserved() = 0; |
136 }; | 139 }; |
137 | 140 |
138 } // namespace autofill | 141 } // namespace autofill |
139 | 142 |
140 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 143 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
OLD | NEW |