OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_PAYMENTS_CORE_PAYMENT_INSTRUMENT_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_INSTRUMENT_H_ |
6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_INSTRUMENT_H_ | 6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_INSTRUMENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual void OnInstrumentDetailsError() = 0; | 32 virtual void OnInstrumentDetailsError() = 0; |
33 }; | 33 }; |
34 | 34 |
35 virtual ~PaymentInstrument(); | 35 virtual ~PaymentInstrument(); |
36 | 36 |
37 // Will call into the |delegate| (can't be null) on success or error. | 37 // Will call into the |delegate| (can't be null) on success or error. |
38 virtual void InvokePaymentApp(Delegate* delegate) = 0; | 38 virtual void InvokePaymentApp(Delegate* delegate) = 0; |
39 // Returns whether the instrument is complete to be used as a payment method | 39 // Returns whether the instrument is complete to be used as a payment method |
40 // without further editing. | 40 // without further editing. |
41 virtual bool IsCompleteForPayment() = 0; | 41 virtual bool IsCompleteForPayment() = 0; |
| 42 // Returns a message to indicate to the user what's missing for the instrument |
| 43 // to be complete for payment. |
| 44 virtual base::string16 GetMissingInfoLabel() = 0; |
42 // Returns whether the instrument is valid for the purposes of responding to | 45 // Returns whether the instrument is valid for the purposes of responding to |
43 // canMakePayment. | 46 // canMakePayment. |
44 virtual bool IsValidForCanMakePayment() = 0; | 47 virtual bool IsValidForCanMakePayment() = 0; |
45 | 48 |
46 const std::string& method_name() const { return method_name_; } | 49 const std::string& method_name() const { return method_name_; } |
47 const base::string16& label() const { return label_; } | 50 const base::string16& label() const { return label_; } |
48 const base::string16& sublabel() const { return sublabel_; } | 51 const base::string16& sublabel() const { return sublabel_; } |
49 int icon_resource_id() const { return icon_resource_id_; } | 52 int icon_resource_id() const { return icon_resource_id_; } |
50 Type type() { return type_; } | 53 Type type() { return type_; } |
51 | 54 |
(...skipping 10 matching lines...) Expand all Loading... |
62 const base::string16 sublabel_; | 65 const base::string16 sublabel_; |
63 int icon_resource_id_; | 66 int icon_resource_id_; |
64 Type type_; | 67 Type type_; |
65 | 68 |
66 DISALLOW_COPY_AND_ASSIGN(PaymentInstrument); | 69 DISALLOW_COPY_AND_ASSIGN(PaymentInstrument); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace payments | 72 } // namespace payments |
70 | 73 |
71 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_INSTRUMENT_H_ | 74 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_INSTRUMENT_H_ |
OLD | NEW |