| 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 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void UpdateWith(mojom::PaymentDetailsPtr details) override {} | 58 void UpdateWith(mojom::PaymentDetailsPtr details) override {} |
| 59 void Abort() override; | 59 void Abort() override; |
| 60 void Complete(mojom::PaymentComplete result) override; | 60 void Complete(mojom::PaymentComplete result) override; |
| 61 void CanMakePayment() override; | 61 void CanMakePayment() override; |
| 62 | 62 |
| 63 // PaymentRequestSpec::Observer: | 63 // PaymentRequestSpec::Observer: |
| 64 void OnInvalidSpecProvided() override; | 64 void OnInvalidSpecProvided() override; |
| 65 | 65 |
| 66 // PaymentRequestState::Delegate: | 66 // PaymentRequestState::Delegate: |
| 67 void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override; | 67 void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override; |
| 68 PaymentRequestDelegate* GetPaymentRequestDelegate() override; |
| 68 | 69 |
| 69 // Called when the user explicitely cancelled the flow. Will send a message | 70 // Called when the user explicitely cancelled the flow. Will send a message |
| 70 // to the renderer which will indirectly destroy this object (through | 71 // to the renderer which will indirectly destroy this object (through |
| 71 // OnConnectionTerminated). | 72 // OnConnectionTerminated). |
| 72 void UserCancelled(); | 73 void UserCancelled(); |
| 73 | 74 |
| 74 // As a result of a browser-side error or renderer-initiated mojo channel | 75 // As a result of a browser-side error or renderer-initiated mojo channel |
| 75 // closure (e.g. there was an error on the renderer side, or payment was | 76 // closure (e.g. there was an error on the renderer side, or payment was |
| 76 // successful), this method is called. It is responsible for cleaning up, | 77 // successful), this method is called. It is responsible for cleaning up, |
| 77 // such as possibly closing the dialog. | 78 // such as possibly closing the dialog. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 98 | 99 |
| 99 // May be null, must outlive this object. | 100 // May be null, must outlive this object. |
| 100 ObserverForTest* observer_for_testing_; | 101 ObserverForTest* observer_for_testing_; |
| 101 | 102 |
| 102 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); | 103 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace payments | 106 } // namespace payments |
| 106 | 107 |
| 107 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 108 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| OLD | NEW |