| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ | 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // false for "https://bobpay.com". | 95 // false for "https://bobpay.com". |
| 96 bool AreRequestedMethodsSupported() const; | 96 bool AreRequestedMethodsSupported() const; |
| 97 | 97 |
| 98 void AddObserver(Observer* observer); | 98 void AddObserver(Observer* observer); |
| 99 void RemoveObserver(Observer* observer); | 99 void RemoveObserver(Observer* observer); |
| 100 | 100 |
| 101 // Initiates the generation of the PaymentResponse. Callers should check | 101 // Initiates the generation of the PaymentResponse. Callers should check |
| 102 // |is_ready_to_pay|, which is inexpensive. | 102 // |is_ready_to_pay|, which is inexpensive. |
| 103 void GeneratePaymentResponse(); | 103 void GeneratePaymentResponse(); |
| 104 | 104 |
| 105 // Record the use of the data models that were used in the Payment Request. |
| 106 void RecordUseStats(); |
| 107 |
| 105 // Gets the Autofill Profile representing the shipping address or contact | 108 // Gets the Autofill Profile representing the shipping address or contact |
| 106 // information currently selected for this PaymentRequest flow. Can return | 109 // information currently selected for this PaymentRequest flow. Can return |
| 107 // null. | 110 // null. |
| 108 autofill::AutofillProfile* selected_shipping_profile() const { | 111 autofill::AutofillProfile* selected_shipping_profile() const { |
| 109 return selected_shipping_profile_; | 112 return selected_shipping_profile_; |
| 110 } | 113 } |
| 111 autofill::AutofillProfile* selected_contact_profile() const { | 114 autofill::AutofillProfile* selected_contact_profile() const { |
| 112 return selected_contact_profile_; | 115 return selected_contact_profile_; |
| 113 } | 116 } |
| 114 // Returns the currently selected instrument for this PaymentRequest flow. | 117 // Returns the currently selected instrument for this PaymentRequest flow. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 PaymentsProfileComparator profile_comparator_; | 222 PaymentsProfileComparator profile_comparator_; |
| 220 | 223 |
| 221 base::ObserverList<Observer> observers_; | 224 base::ObserverList<Observer> observers_; |
| 222 | 225 |
| 223 DISALLOW_COPY_AND_ASSIGN(PaymentRequestState); | 226 DISALLOW_COPY_AND_ASSIGN(PaymentRequestState); |
| 224 }; | 227 }; |
| 225 | 228 |
| 226 } // namespace payments | 229 } // namespace payments |
| 227 | 230 |
| 228 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ | 231 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ |
| OLD | NEW |