Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: chrome/browser/payments/payment_request_impl.h

Issue 2446093004: [Web Payments] Initial plumb of Payment Request dialog (Closed)
Patch Set: Handle new member function Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/payments/BUILD.gn ('k') | chrome/browser/payments/payment_request_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fdc3d47558748d4a538065a5afc8245e1a01bdd9
--- /dev/null
+++ b/chrome/browser/payments/payment_request_impl.h
@@ -0,0 +1,55 @@
+// 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 "mojo/public/cpp/bindings/binding.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace payments {
+
+class PaymentRequestDialog;
+
+class PaymentRequestImpl : payments::mojom::PaymentRequest,
+ public base::RefCounted<PaymentRequestImpl> {
+ public:
+ PaymentRequestImpl(
+ content::WebContents* web_contents,
+ mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
+
+ // payments::mojom::PaymentRequest "stub"
+ void Init(payments::mojom::PaymentRequestClientPtr client,
+ std::vector<payments::mojom::PaymentMethodDataPtr> methodData,
+ payments::mojom::PaymentDetailsPtr details,
+ payments::mojom::PaymentOptionsPtr options) override;
+ void Show() override {}
+ void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {}
+ void Abort() override {}
+ void Complete(payments::mojom::PaymentComplete result) override {}
+ void CanMakeActivePayment() override {}
+
+ void OnError();
+
+ private:
+ friend class base::RefCounted<PaymentRequestImpl>;
+ ~PaymentRequestImpl() override;
+
+ content::WebContents* web_contents_;
+ mojo::Binding<payments::mojom::PaymentRequest> binding_;
+ PaymentRequestDialog* dialog_;
+ DISALLOW_COPY_AND_ASSIGN(PaymentRequestImpl);
+};
+
+} // namespace payments
+
+void CreatePaymentRequestHandler(
+ content::WebContents* web_contents,
+ mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
+
+#endif // CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_
« no previous file with comments | « chrome/browser/payments/BUILD.gn ('k') | chrome/browser/payments/payment_request_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698