| 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_CARD_UNMASK_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 9 | 11 |
| 10 namespace autofill { | 12 namespace autofill { |
| 11 | 13 |
| 12 class CardUnmaskDelegate { | 14 class CardUnmaskDelegate { |
| 13 public: | 15 public: |
| 16 struct UnmaskResponse { |
| 17 UnmaskResponse(); |
| 18 ~UnmaskResponse(); |
| 19 |
| 20 // User input data. |
| 21 base::string16 cvc; |
| 22 base::string16 exp_month; |
| 23 base::string16 exp_year; |
| 24 |
| 25 // Risk fingerprint. |
| 26 std::string risk_data; |
| 27 }; |
| 28 |
| 14 // Called when the user has attempted a verification. Prompt is still | 29 // Called when the user has attempted a verification. Prompt is still |
| 15 // open at this point. | 30 // open at this point. |
| 16 virtual void OnUnmaskResponse(const base::string16& cvc, | 31 virtual void OnUnmaskResponse(const UnmaskResponse& response) = 0; |
| 17 const base::string16& exp_month, | |
| 18 const base::string16& exp_year) = 0; | |
| 19 | 32 |
| 20 // Called when the unmask prompt is closed (e.g., cancelled). | 33 // Called when the unmask prompt is closed (e.g., cancelled). |
| 21 virtual void OnUnmaskPromptClosed() = 0; | 34 virtual void OnUnmaskPromptClosed() = 0; |
| 22 }; | 35 }; |
| 23 | 36 |
| 24 } // namespace autofill | 37 } // namespace autofill |
| 25 | 38 |
| 26 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ | 39 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| OLD | NEW |