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 CONTENT_PUBLIC_BROWSER_STORED_PAYMENT_INSTRUMENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_STORED_PAYMENT_INSTRUMENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_STORED_PAYMENT_INSTRUMENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_STORED_PAYMENT_INSTRUMENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "third_party/skia/include/core/SkBitmap.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 // This class represents the stored payment instrument in UA. | 18 // This class represents the stored payment instrument in UA. |
18 struct CONTENT_EXPORT StoredPaymentInstrument { | 19 struct CONTENT_EXPORT StoredPaymentInstrument { |
19 StoredPaymentInstrument(); | 20 StoredPaymentInstrument(); |
20 ~StoredPaymentInstrument(); | 21 ~StoredPaymentInstrument(); |
21 | 22 |
22 // Id of the service worker registration this instrument is associated with. | 23 // Id of the service worker registration this instrument is associated with. |
23 int64_t registration_id = 0; | 24 int64_t registration_id = 0; |
24 | 25 |
25 // Id of this payment instrument. This key will be passed to the payment | 26 // Id of this payment instrument. This key will be passed to the payment |
26 // handler to indicate the instrument selected by the user. | 27 // handler to indicate the instrument selected by the user. |
27 std::string instrument_key; | 28 std::string instrument_key; |
28 | 29 |
29 // Origin of the payment app provider that provides this payment instrument. | 30 // Origin of the payment app provider that provides this payment instrument. |
30 GURL origin; | 31 GURL origin; |
31 | 32 |
32 // Label for this payment instrument. | 33 // Label for this payment instrument. |
33 std::string name; | 34 std::string name; |
34 | 35 |
| 36 // Decoded icon for this payment instrument. |
| 37 std::unique_ptr<SkBitmap> icon; |
| 38 |
35 // A list of one or more payment method identifiers of the payment methods | 39 // A list of one or more payment method identifiers of the payment methods |
36 // supported by this payment instrument. | 40 // supported by this payment instrument. |
37 std::vector<std::string> enabled_methods; | 41 std::vector<std::string> enabled_methods; |
38 }; | 42 }; |
39 | 43 |
40 } // namespace content | 44 } // namespace content |
41 | 45 |
42 #endif // CONTENT_PUBLIC_BROWSER_STORED_PAYMENT_INSTRUMENT_H_ | 46 #endif // CONTENT_PUBLIC_BROWSER_STORED_PAYMENT_INSTRUMENT_H_ |
OLD | NEW |