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

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

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: why did I do that? Created 4 years, 6 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
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.ui; 5 package org.chromium.chrome.browser.payments.ui;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.AnimatorListenerAdapter; 8 import android.animation.AnimatorListenerAdapter;
9 import android.animation.AnimatorSet; 9 import android.animation.AnimatorSet;
10 import android.animation.ObjectAnimator; 10 import android.animation.ObjectAnimator;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 * <li>Successfully processing the payment.</li> 391 * <li>Successfully processing the payment.</li>
392 * <li>Failure to process the payment.</li> 392 * <li>Failure to process the payment.</li>
393 * <li>The JavaScript calling the abort() method in PaymentRequest API.</li > 393 * <li>The JavaScript calling the abort() method in PaymentRequest API.</li >
394 * <li>The PaymentRequest JavaScript object being destroyed.</li> 394 * <li>The PaymentRequest JavaScript object being destroyed.</li>
395 * </ul> 395 * </ul>
396 * 396 *
397 * Does not call Client.onDismissed(). 397 * Does not call Client.onDismissed().
398 * 398 *
399 * Should not be called multiple times. 399 * Should not be called multiple times.
400 * 400 *
401 * @param paymentSuccess Whether the payment (if any) was successful. 401 * @param immediateClose Whether dismissing the dialog immediately without d escribing error.
palmer 2016/06/16 22:00:55 This comment is not a complete English sentence. H
402 * @param callback The callback to notify of finished animations. 402 * @param callback The callback to notify of finished animations.
403 */ 403 */
404 public void close(boolean paymentSuccess, final Runnable callback) { 404 public void close(boolean immediateClose, final Runnable callback) {
405 mIsClientClosing = true; 405 mIsClientClosing = true;
406 mResultView.update(paymentSuccess, new Runnable() { 406 mResultView.update(immediateClose, new Runnable() {
407 @Override 407 @Override
408 public void run() { 408 public void run() {
409 dismissDialog(false); 409 dismissDialog(false);
410 if (callback != null) callback.run(); 410 if (callback != null) callback.run();
411 } 411 }
412 }); 412 });
413 if (sObserverForTest != null) sObserverForTest.onPaymentRequestResultRea dy(this); 413 if (sObserverForTest != null) sObserverForTest.onPaymentRequestResultRea dy(this);
414 } 414 }
415 415
416 /** 416 /**
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 sObserverForTest.onPaymentRequestReadyToPay(this); 934 sObserverForTest.onPaymentRequestReadyToPay(this);
935 } 935 }
936 } 936 }
937 937
938 private void notifyReadyToClose() { 938 private void notifyReadyToClose() {
939 if (sObserverForTest != null && isAcceptingCloseButton()) { 939 if (sObserverForTest != null && isAcceptingCloseButton()) {
940 sObserverForTest.onPaymentRequestReadyToClose(this); 940 sObserverForTest.onPaymentRequestReadyToClose(this);
941 } 941 }
942 } 942 }
943 } 943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698