OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ | 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ |
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ | 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ |
7 | 7 |
| 8 #include "components/payments/payment_app.mojom.h" |
8 #include "content/common/service_worker/service_worker_status_code.h" | 9 #include "content/common/service_worker/service_worker_status_code.h" |
| 10 #include "third_party/WebKit/public/platform/modules/payments/WebPaymentAppReque
st.h" |
9 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke
r_event_status.mojom.h" | 11 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke
r_event_status.mojom.h" |
10 | 12 |
11 namespace mojo { | 13 namespace mojo { |
12 | 14 |
13 template <> | 15 template <> |
14 struct CONTENT_EXPORT TypeConverter<content::ServiceWorkerStatusCode, | 16 struct CONTENT_EXPORT TypeConverter<content::ServiceWorkerStatusCode, |
15 blink::mojom::ServiceWorkerEventStatus> { | 17 blink::mojom::ServiceWorkerEventStatus> { |
16 static content::ServiceWorkerStatusCode Convert( | 18 static content::ServiceWorkerStatusCode Convert( |
17 blink::mojom::ServiceWorkerEventStatus status); | 19 blink::mojom::ServiceWorkerEventStatus status); |
18 }; | 20 }; |
19 | 21 |
| 22 template <> |
| 23 struct TypeConverter<blink::WebPaymentAppRequest, |
| 24 payments::mojom::PaymentAppRequestPtr> { |
| 25 static blink::WebPaymentAppRequest Convert( |
| 26 const payments::mojom::PaymentAppRequestPtr& input); |
| 27 }; |
| 28 |
| 29 template <> |
| 30 struct TypeConverter<blink::WebPaymentMethodData, |
| 31 payments::mojom::PaymentMethodDataPtr> { |
| 32 static blink::WebPaymentMethodData Convert( |
| 33 const payments::mojom::PaymentMethodDataPtr& input); |
| 34 }; |
| 35 |
| 36 template <> |
| 37 struct TypeConverter<blink::WebPaymentItem, payments::mojom::PaymentItemPtr> { |
| 38 static blink::WebPaymentItem Convert( |
| 39 const payments::mojom::PaymentItemPtr& input); |
| 40 }; |
| 41 |
| 42 template <> |
| 43 struct TypeConverter<blink::WebPaymentCurrencyAmount, |
| 44 payments::mojom::PaymentCurrencyAmountPtr> { |
| 45 static blink::WebPaymentCurrencyAmount Convert( |
| 46 const payments::mojom::PaymentCurrencyAmountPtr& input); |
| 47 }; |
| 48 |
| 49 template <> |
| 50 struct TypeConverter<blink::WebPaymentDetailsModifier, |
| 51 payments::mojom::PaymentDetailsModifierPtr> { |
| 52 static blink::WebPaymentDetailsModifier Convert( |
| 53 const payments::mojom::PaymentDetailsModifierPtr& input); |
| 54 }; |
| 55 |
20 } // namespace | 56 } // namespace |
21 | 57 |
22 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ | 58 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_ |
OLD | NEW |