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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestDialog.java

Issue 1902913002: Provide web contents to Chrome's mojo services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 package org.chromium.chrome.browser.payments;
6
7 import android.content.Context;
8
9 import org.chromium.mojo.system.MojoException;
10 import org.chromium.mojom.payments.PaymentDetails;
11 import org.chromium.mojom.payments.PaymentOptions;
12 import org.chromium.mojom.payments.PaymentRequest;
13 import org.chromium.mojom.payments.PaymentRequestClient;
14
15 /**
16 * Android implementation of the PaymentRequest service defined in
17 * third_party/WebKit/public/platform/modules/payments/payment_request.mojom.
18 */
19 public class PaymentRequestDialog implements PaymentRequest {
20 private final Context mApplicationContext;
21 private PaymentRequestClient mClient;
22
23 /**
24 * Builds the dialog.
25 *
26 * @param applicationContext The application context.
27 */
28 public PaymentRequestDialog(Context applicationContext) {
29 mApplicationContext = applicationContext;
30 }
31
32 @Override
33 public void setClient(PaymentRequestClient client) {
34 mClient = client;
35 }
36
37 @Override
38 public void show(String[] supportedMethods, PaymentDetails details, PaymentO ptions options,
39 String stringifiedData) {
40 assert mClient != null;
41 mClient.onError();
42 }
43
44 @Override
45 public void abort() {}
46
47 @Override
48 public void complete(boolean success) {
49 assert mClient != null;
50 mClient.onComplete();
51 }
52
53 @Override
54 public void close() {}
55
56 @Override
57 public void onConnectionError(MojoException e) {}
58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698