| 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> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 | 11 |
| 12 namespace autofill { | 12 namespace autofill { |
| 13 | 13 |
| 14 class CardUnmaskDelegate { | 14 class CardUnmaskDelegate { |
| 15 public: | 15 public: |
| 16 struct UnmaskResponse { | 16 struct UnmaskResponse { |
| 17 UnmaskResponse(); | 17 UnmaskResponse(); |
| 18 UnmaskResponse(const UnmaskResponse& other); |
| 18 ~UnmaskResponse(); | 19 ~UnmaskResponse(); |
| 19 | 20 |
| 20 // User input data. | 21 // User input data. |
| 21 base::string16 cvc; | 22 base::string16 cvc; |
| 22 | 23 |
| 23 // Two digit month. | 24 // Two digit month. |
| 24 base::string16 exp_month; | 25 base::string16 exp_month; |
| 25 | 26 |
| 26 // Four digit year. | 27 // Four digit year. |
| 27 base::string16 exp_year; | 28 base::string16 exp_year; |
| 28 | 29 |
| 29 // State of "copy to this device" checkbox. | 30 // State of "copy to this device" checkbox. |
| 30 bool should_store_pan; | 31 bool should_store_pan; |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 // Called when the user has attempted a verification. Prompt is still | 34 // Called when the user has attempted a verification. Prompt is still |
| 34 // open at this point. | 35 // open at this point. |
| 35 virtual void OnUnmaskResponse(const UnmaskResponse& response) = 0; | 36 virtual void OnUnmaskResponse(const UnmaskResponse& response) = 0; |
| 36 | 37 |
| 37 // Called when the unmask prompt is closed (e.g., cancelled). | 38 // Called when the unmask prompt is closed (e.g., cancelled). |
| 38 virtual void OnUnmaskPromptClosed() = 0; | 39 virtual void OnUnmaskPromptClosed() = 0; |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 } // namespace autofill | 42 } // namespace autofill |
| 42 | 43 |
| 43 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ | 44 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| OLD | NEW |