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 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
6 | 6 |
7 import android.os.Handler; | 7 import android.os.Handler; |
8 import android.view.View; | 8 import android.view.View; |
9 import android.view.ViewGroup; | 9 import android.view.ViewGroup; |
10 import android.widget.CheckBox; | 10 import android.widget.CheckBox; |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 public String getIdentifier() { | 710 public String getIdentifier() { |
711 return mMethodName; | 711 return mMethodName; |
712 } | 712 } |
713 } | 713 } |
714 | 714 |
715 /** A payment instrument implementation for test. */ | 715 /** A payment instrument implementation for test. */ |
716 private static class TestPayInstrument extends PaymentInstrument { | 716 private static class TestPayInstrument extends PaymentInstrument { |
717 private final String mMethodName; | 717 private final String mMethodName; |
718 | 718 |
719 TestPayInstrument(String methodName) { | 719 TestPayInstrument(String methodName) { |
720 super(methodName, "Test Pay", null, NO_ICON); | 720 super(methodName, "Test Pay", null, null); |
721 mMethodName = methodName; | 721 mMethodName = methodName; |
722 } | 722 } |
723 | 723 |
724 @Override | 724 @Override |
725 public String getMethodName() { | 725 public String getMethodName() { |
726 return mMethodName; | 726 return mMethodName; |
727 } | 727 } |
728 | 728 |
729 @Override | 729 @Override |
730 public void getDetails(String merchantName, String origin, PaymentItem t
otal, | 730 public void getDetails(String merchantName, String origin, PaymentItem t
otal, |
731 List<PaymentItem> cart, JSONObject details, DetailsCallback deta
ilsCallback) { | 731 List<PaymentItem> cart, JSONObject details, DetailsCallback deta
ilsCallback) { |
732 detailsCallback.onInstrumentDetailsReady( | 732 detailsCallback.onInstrumentDetailsReady( |
733 mMethodName, "{\"transaction\": 1337}"); | 733 mMethodName, "{\"transaction\": 1337}"); |
734 } | 734 } |
735 | 735 |
736 @Override | 736 @Override |
737 public void dismiss() {} | 737 public void dismiss() {} |
738 } | 738 } |
739 } | 739 } |
OLD | NEW |