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 <memory> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
11 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "ui/base/window_open_disposition.h" | 17 #include "ui/base/window_open_disposition.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 129 |
129 // Runs |callback| if the |card| should be imported as personal data. | 130 // Runs |callback| if the |card| should be imported as personal data. |
130 // |metric_logger| can be used to log user actions. | 131 // |metric_logger| can be used to log user actions. |
131 virtual void ConfirmSaveCreditCardLocally(const CreditCard& card, | 132 virtual void ConfirmSaveCreditCardLocally(const CreditCard& card, |
132 const base::Closure& callback) = 0; | 133 const base::Closure& callback) = 0; |
133 | 134 |
134 // Runs |callback| if the |card| should be uploaded to Payments. Displays the | 135 // Runs |callback| if the |card| should be uploaded to Payments. Displays the |
135 // contents of |legal_message| to the user. | 136 // contents of |legal_message| to the user. |
136 virtual void ConfirmSaveCreditCardToCloud( | 137 virtual void ConfirmSaveCreditCardToCloud( |
137 const CreditCard& card, | 138 const CreditCard& card, |
138 scoped_ptr<base::DictionaryValue> legal_message, | 139 std::unique_ptr<base::DictionaryValue> legal_message, |
139 const base::Closure& callback) = 0; | 140 const base::Closure& callback) = 0; |
140 | 141 |
141 // Gathers risk data and provides it to |callback|. | 142 // Gathers risk data and provides it to |callback|. |
142 virtual void LoadRiskData( | 143 virtual void LoadRiskData( |
143 const base::Callback<void(const std::string&)>& callback) = 0; | 144 const base::Callback<void(const std::string&)>& callback) = 0; |
144 | 145 |
145 // Returns true if both the platform and the device support scanning credit | 146 // Returns true if both the platform and the device support scanning credit |
146 // cards. Should be called before ScanCreditCard(). | 147 // cards. Should be called before ScanCreditCard(). |
147 virtual bool HasCreditCardScanFeature() = 0; | 148 virtual bool HasCreditCardScanFeature() = 0; |
148 | 149 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Informs the client that a user gesture has been observed. | 192 // Informs the client that a user gesture has been observed. |
192 virtual void OnFirstUserGestureObserved() = 0; | 193 virtual void OnFirstUserGestureObserved() = 0; |
193 | 194 |
194 // If the context is secure. | 195 // If the context is secure. |
195 virtual bool IsContextSecure(const GURL& form_origin) = 0; | 196 virtual bool IsContextSecure(const GURL& form_origin) = 0; |
196 }; | 197 }; |
197 | 198 |
198 } // namespace autofill | 199 } // namespace autofill |
199 | 200 |
200 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 201 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
OLD | NEW |