| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ |
| 6 #define CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ | 6 #define CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ |
| 7 | 7 |
| 8 #include "components/payments/payment_request.mojom.h" | 8 #include "components/payments/payment_request.mojom.h" |
| 9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 payments::mojom::PaymentDetailsPtr details, | 27 payments::mojom::PaymentDetailsPtr details, |
| 28 payments::mojom::PaymentOptionsPtr options) override; | 28 payments::mojom::PaymentOptionsPtr options) override; |
| 29 void Show() override; | 29 void Show() override; |
| 30 void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {} | 30 void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {} |
| 31 void Abort() override {} | 31 void Abort() override {} |
| 32 void Complete(payments::mojom::PaymentComplete result) override {} | 32 void Complete(payments::mojom::PaymentComplete result) override {} |
| 33 void CanMakePayment() override {} | 33 void CanMakePayment() override {} |
| 34 | 34 |
| 35 void Cancel(); | 35 void Cancel(); |
| 36 void OnError(); | 36 void OnError(); |
| 37 payments::mojom::PaymentDetails* details() { return details_.get(); } |
| 37 | 38 |
| 38 content::WebContents* web_contents() { return web_contents_; } | 39 content::WebContents* web_contents() { return web_contents_; } |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 friend class base::RefCounted<PaymentRequestImpl>; | 42 friend class base::RefCounted<PaymentRequestImpl>; |
| 42 ~PaymentRequestImpl() override; | 43 ~PaymentRequestImpl() override; |
| 43 | 44 |
| 44 content::WebContents* web_contents_; | 45 content::WebContents* web_contents_; |
| 45 mojo::Binding<payments::mojom::PaymentRequest> binding_; | 46 mojo::Binding<payments::mojom::PaymentRequest> binding_; |
| 46 payments::mojom::PaymentRequestClientPtr client_; | 47 payments::mojom::PaymentRequestClientPtr client_; |
| 48 payments::mojom::PaymentDetailsPtr details_; |
| 47 | 49 |
| 48 DISALLOW_COPY_AND_ASSIGN(PaymentRequestImpl); | 50 DISALLOW_COPY_AND_ASSIGN(PaymentRequestImpl); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 } // namespace payments | 53 } // namespace payments |
| 52 | 54 |
| 53 void CreatePaymentRequestHandler( | 55 void CreatePaymentRequestHandler( |
| 54 content::WebContents* web_contents, | 56 content::WebContents* web_contents, |
| 55 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request); | 57 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request); |
| 56 | 58 |
| 57 #endif // CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ | 59 #endif // CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ |
| OLD | NEW |