Chromium Code Reviews| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 // PaymentRequestState::Delegate: | 68 // PaymentRequestState::Delegate: |
| 69 void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override; | 69 void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override; |
| 70 void OnShippingOptionIdSelected(std::string shipping_option_id) override; | 70 void OnShippingOptionIdSelected(std::string shipping_option_id) override; |
| 71 void OnShippingAddressSelected(mojom::PaymentAddressPtr address) override; | 71 void OnShippingAddressSelected(mojom::PaymentAddressPtr address) override; |
| 72 | 72 |
| 73 // Called when the user explicitely cancelled the flow. Will send a message | 73 // Called when the user explicitely cancelled the flow. Will send a message |
| 74 // to the renderer which will indirectly destroy this object (through | 74 // to the renderer which will indirectly destroy this object (through |
| 75 // OnConnectionTerminated). | 75 // OnConnectionTerminated). |
| 76 void UserCancelled(); | 76 void UserCancelled(); |
| 77 | 77 |
| 78 // Called when there is a navigation out of a page with a PaymentRequest | |
|
Mathieu
2017/05/09 18:12:19
// Called when the frame attached to this PaymentR
sebsg
2017/05/10 14:58:48
Reload triggers it but not a tab closing. However,
| |
| 79 // dialog. | |
| 80 void NavigatedAway(bool is_user_initiated); | |
|
Mathieu
2017/05/09 18:12:19
DidStartNavigation(bool is_user_initiated) is a mo
sebsg
2017/05/10 14:58:48
Done.
| |
| 81 | |
| 78 // As a result of a browser-side error or renderer-initiated mojo channel | 82 // As a result of a browser-side error or renderer-initiated mojo channel |
| 79 // closure (e.g. there was an error on the renderer side, or payment was | 83 // closure (e.g. there was an error on the renderer side, or payment was |
| 80 // successful), this method is called. It is responsible for cleaning up, | 84 // successful), this method is called. It is responsible for cleaning up, |
| 81 // such as possibly closing the dialog. | 85 // such as possibly closing the dialog. |
| 82 void OnConnectionTerminated(); | 86 void OnConnectionTerminated(); |
| 83 | 87 |
| 84 // Called when the user clicks on the "Pay" button. | 88 // Called when the user clicks on the "Pay" button. |
| 85 void Pay(); | 89 void Pay(); |
| 86 | 90 |
| 87 content::WebContents* web_contents() { return web_contents_; } | 91 content::WebContents* web_contents() { return web_contents_; } |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 104 ObserverForTest* observer_for_testing_; | 108 ObserverForTest* observer_for_testing_; |
| 105 | 109 |
| 106 JourneyLogger journey_logger_; | 110 JourneyLogger journey_logger_; |
| 107 | 111 |
| 108 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); | 112 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); |
| 109 }; | 113 }; |
| 110 | 114 |
| 111 } // namespace payments | 115 } // namespace payments |
| 112 | 116 |
| 113 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 117 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| OLD | NEW |