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

Side by Side Diff: chrome/browser/payments/payment_request_impl.h

Issue 2446093004: [Web Payments] Initial plumb of Payment Request dialog (Closed)
Patch Set: Minor responses 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_
6 #define CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_
7
8 #include "components/payments/payment_request.mojom.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10
11 namespace content {
12 class WebContents;
13 }
14
15 namespace payments {
16
17 class PaymentRequestDialog;
18
19 class PaymentRequestImpl : payments::mojom::PaymentRequest,
20 public base::RefCounted<PaymentRequestImpl> {
21 public:
22 PaymentRequestImpl(
23 content::WebContents* web_contents,
24 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
25
26 private:
27 friend class base::RefCounted<PaymentRequestImpl>;
Lei Zhang 2016/11/16 00:59:33 Most often, existing code just put these in the pr
Kevin Bailey 2016/11/16 14:13:47 I moved it here because Rouslan suggested that the
Lei Zhang 2016/11/16 18:39:30 At the time of that suggestion, the destructor was
Kevin Bailey 2016/11/16 22:34:09 I understand. Done. I assume we still want the des
28 ~PaymentRequestImpl() override;
29
30 public:
31 // payments::mojom::PaymentRequest "stub"
32 void Init(payments::mojom::PaymentRequestClientPtr client,
33 std::vector<payments::mojom::PaymentMethodDataPtr> methodData,
34 payments::mojom::PaymentDetailsPtr details,
35 payments::mojom::PaymentOptionsPtr options) override;
36 void Show() override {}
37 void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {}
38 void Abort() override {}
39 void Complete(payments::mojom::PaymentComplete result) override {}
40 void onError();
Lei Zhang 2016/11/16 00:59:33 OnError() ? Is this suppose to be part of the mojo
Kevin Bailey 2016/11/16 14:13:47 I capitalized it in case that's what you're hintin
Lei Zhang 2016/11/16 18:39:30 There's no override keyword, so I wasn't sure if i
Kevin Bailey 2016/11/16 22:34:09 I didn't space it away either. Fixed.
41
42 private:
43 content::WebContents* web_contents_;
44 mojo::Binding<payments::mojom::PaymentRequest> binding_;
45 PaymentRequestDialog* dialog_;
46 DISALLOW_COPY_AND_ASSIGN(PaymentRequestImpl);
47 };
48
49 } // namespace payments
50
51 void CreatePaymentRequestHandler(
52 content::WebContents* web_contents,
53 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
54
55 #endif // CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698