Chromium Code Reviews| Index: chrome/browser/payments/payment_request_impl.h |
| diff --git a/chrome/browser/payments/payment_request_impl.h b/chrome/browser/payments/payment_request_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c7f111046e7c565a849e05b65d889f8ac8f31773 |
| --- /dev/null |
| +++ b/chrome/browser/payments/payment_request_impl.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ |
| +#define CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ |
| + |
| +#include "components/payments/payment_request.mojom.h" |
| + |
| +#include "content/public/browser/render_frame_host.h" |
|
Lei Zhang
2016/11/09 18:08:55
Forward declare? (Chromium style diverges from goo
Kevin Bailey
2016/11/15 14:36:32
It doesn't seem to provide any benefit in this lea
|
| +#include "content/public/browser/web_contents.h" |
| +#include "mojo/public/cpp/bindings/binding.h" |
| + |
| +class PaymentRequestImpl : blink::mojom::PaymentRequest { |
| + public: |
| + PaymentRequestImpl( |
| + content::RenderFrameHost* render_frame_host, |
| + content::WebContents* web_contents, |
| + mojo::InterfaceRequest<blink::mojom::PaymentRequest> request); |
| + ~PaymentRequestImpl() override; |
| + |
| + // payments::mojom::PaymentRequest "stub" |
| + void Init(blink::mojom::PaymentRequestClientPtr client, |
| + std::vector<blink::mojom::PaymentMethodDataPtr> methodData, |
| + blink::mojom::PaymentDetailsPtr details, |
| + blink::mojom::PaymentOptionsPtr options) override; |
| + void Show() override {} |
|
Lei Zhang
2016/11/09 18:08:56
Not sure if the compiler will like the impl for vi
Kevin Bailey
2016/11/15 14:36:32
I haven't seen any complain.
|
| + void UpdateWith(blink::mojom::PaymentDetailsPtr details) override {} |
| + void Abort() override {} |
| + void Complete(blink::mojom::PaymentComplete result) override {} |
| + |
| + private: |
| + content::WebContents* web_contents_; |
| + mojo::Binding<blink::mojom::PaymentRequest> binding_; |
| + DISALLOW_COPY_AND_ASSIGN(PaymentRequestImpl); |
| +}; |
| + |
| +void CreatePaymentRequestHandler( |
| + content::RenderFrameHost* render_frame_host, |
| + content::WebContents* web_contents, |
| + mojo::InterfaceRequest<blink::mojom::PaymentRequest> request); |
| + |
| +#endif // CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ |