| 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 #import "ios/chrome/browser/ui/payments/payment_request_manager.h" | 5 #import "ios/chrome/browser/ui/payments/payment_request_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/ios/block_types.h" | 9 #include "base/ios/block_types.h" |
| 10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 _pendingPaymentResponse.contactAddress.GetRawInfo( | 769 _pendingPaymentResponse.contactAddress.GetRawInfo( |
| 770 autofill::EMAIL_ADDRESS); | 770 autofill::EMAIL_ADDRESS); |
| 771 } | 771 } |
| 772 | 772 |
| 773 if (_paymentRequest->request_payer_phone()) { | 773 if (_paymentRequest->request_payer_phone()) { |
| 774 paymentResponse.payer_phone = | 774 paymentResponse.payer_phone = |
| 775 _pendingPaymentResponse.contactAddress.GetRawInfo( | 775 _pendingPaymentResponse.contactAddress.GetRawInfo( |
| 776 autofill::PHONE_HOME_WHOLE_NUMBER); | 776 autofill::PHONE_HOME_WHOLE_NUMBER); |
| 777 } | 777 } |
| 778 | 778 |
| 779 _paymentRequest->RecordUseStats(); |
| 780 |
| 779 [_paymentRequestJsManager | 781 [_paymentRequestJsManager |
| 780 resolveRequestPromiseWithPaymentResponse:paymentResponse | 782 resolveRequestPromiseWithPaymentResponse:paymentResponse |
| 781 completionHandler:nil]; | 783 completionHandler:nil]; |
| 782 [self setUnblockEventQueueTimer]; | 784 [self setUnblockEventQueueTimer]; |
| 783 [self setPaymentResponseTimeoutTimer]; | 785 [self setPaymentResponseTimeoutTimer]; |
| 784 } | 786 } |
| 785 | 787 |
| 786 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator | 788 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator |
| 787 didSelectShippingAddress: | 789 didSelectShippingAddress: |
| 788 (const autofill::AutofillProfile&)shippingAddress { | 790 (const autofill::AutofillProfile&)shippingAddress { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 807 #pragma mark - CRWWebStateObserver methods | 809 #pragma mark - CRWWebStateObserver methods |
| 808 | 810 |
| 809 - (void)webState:(web::WebState*)webState | 811 - (void)webState:(web::WebState*)webState |
| 810 didCommitNavigationWithDetails: | 812 didCommitNavigationWithDetails: |
| 811 (const web::LoadCommittedDetails&)load_details { | 813 (const web::LoadCommittedDetails&)load_details { |
| 812 [self dismissUI]; | 814 [self dismissUI]; |
| 813 [self enableCurrentWebState]; | 815 [self enableCurrentWebState]; |
| 814 } | 816 } |
| 815 | 817 |
| 816 @end | 818 @end |
| OLD | NEW |