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.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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } | 394 } |
395 | 395 |
396 /** | 396 /** |
397 * Updates the shipping options in response to a changed shipping address. | 397 * Updates the shipping options in response to a changed shipping address. |
398 * | 398 * |
399 * @param shipping The shipping options. | 399 * @param shipping The shipping options. |
400 */ | 400 */ |
401 public void updateShippingOptionsSection(SectionInformation section) { | 401 public void updateShippingOptionsSection(SectionInformation section) { |
402 mShippingOptionsSectionInformation = section; | 402 mShippingOptionsSectionInformation = section; |
403 mShippingOptionSection.update(section); | 403 mShippingOptionSection.update(section); |
| 404 updatePayButtonEnabled(); |
404 } | 405 } |
405 | 406 |
406 private void updatePaymentMethodSection(SectionInformation section) { | 407 private void updatePaymentMethodSection(SectionInformation section) { |
407 mPaymentMethodSectionInformation = section; | 408 mPaymentMethodSectionInformation = section; |
408 mPaymentMethodSection.update(section); | 409 mPaymentMethodSection.update(section); |
409 } | 410 } |
410 | 411 |
411 @Override | 412 @Override |
412 public void onPaymentOptionChanged(OptionSection section, PaymentOption opti
on) { | 413 public void onPaymentOptionChanged(OptionSection section, PaymentOption opti
on) { |
413 if (section == mShippingAddressSection) { | 414 if (section == mShippingAddressSection) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 @Override | 721 @Override |
721 public void onAnimationEnd(Animator animation) { | 722 public void onAnimationEnd(Animator animation) { |
722 mCurrentAnimator = null; | 723 mCurrentAnimator = null; |
723 update(0.0f); | 724 update(0.0f); |
724 } | 725 } |
725 }); | 726 }); |
726 mCurrentAnimator.start(); | 727 mCurrentAnimator.start(); |
727 } | 728 } |
728 } | 729 } |
729 } | 730 } |
OLD | NEW |