| 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 #include "components/payments/content/payment_request.h" | 5 #include "components/payments/content/payment_request.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 client_.reset(); | 105 client_.reset(); |
| 106 binding_.Close(); | 106 binding_.Close(); |
| 107 delegate_->CloseDialog(); | 107 delegate_->CloseDialog(); |
| 108 manager_->DestroyRequest(this); | 108 manager_->DestroyRequest(this); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void PaymentRequest::Pay() { | 111 void PaymentRequest::Pay() { |
| 112 DCHECK(is_ready_to_pay_); | 112 DCHECK(is_ready_to_pay_); |
| 113 | 113 |
| 114 // TODO(mathp): Return the PaymentResponse to the |client_|. | 114 // TODO(mathp): Return the PaymentResponse to the |client_|. |
| 115 UserCancelled(); | 115 OnConnectionTerminated(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void PaymentRequest::AddObserver(Observer* observer) { | 118 void PaymentRequest::AddObserver(Observer* observer) { |
| 119 CHECK(observer); | 119 CHECK(observer); |
| 120 observers_.AddObserver(observer); | 120 observers_.AddObserver(observer); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void PaymentRequest::RemoveObserver(Observer* observer) { | 123 void PaymentRequest::RemoveObserver(Observer* observer) { |
| 124 observers_.RemoveObserver(observer); | 124 observers_.RemoveObserver(observer); |
| 125 } | 125 } |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 ->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), | 324 ->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), |
| 325 app_locale) | 325 app_locale) |
| 326 .empty())) { | 326 .empty())) { |
| 327 return false; | 327 return false; |
| 328 } | 328 } |
| 329 | 329 |
| 330 return true; | 330 return true; |
| 331 } | 331 } |
| 332 | 332 |
| 333 } // namespace payments | 333 } // namespace payments |
| OLD | NEW |