Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Side by Side Diff: components/payments/content/payment_request.h

Issue 2870153002: [Payments] Record navigations that close the Payment Request as aborts. (Closed)
Patch Set: Addressed comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // PaymentRequestState::Delegate: 72 // PaymentRequestState::Delegate:
73 void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override; 73 void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override;
74 void OnShippingOptionIdSelected(std::string shipping_option_id) override; 74 void OnShippingOptionIdSelected(std::string shipping_option_id) override;
75 void OnShippingAddressSelected(mojom::PaymentAddressPtr address) override; 75 void OnShippingAddressSelected(mojom::PaymentAddressPtr address) override;
76 76
77 // Called when the user explicitely cancelled the flow. Will send a message 77 // Called when the user explicitely cancelled the flow. Will send a message
78 // to the renderer which will indirectly destroy this object (through 78 // to the renderer which will indirectly destroy this object (through
79 // OnConnectionTerminated). 79 // OnConnectionTerminated).
80 void UserCancelled(); 80 void UserCancelled();
81 81
82 // Called when the frame attached to this PaymentRequest is navigating away,
83 // but before the PaymentRequest is destroyed.
84 void DidStartNavigation(bool is_user_initiated);
85
82 // As a result of a browser-side error or renderer-initiated mojo channel 86 // As a result of a browser-side error or renderer-initiated mojo channel
83 // closure (e.g. there was an error on the renderer side, or payment was 87 // closure (e.g. there was an error on the renderer side, or payment was
84 // successful), this method is called. It is responsible for cleaning up, 88 // successful), this method is called. It is responsible for cleaning up,
85 // such as possibly closing the dialog. 89 // such as possibly closing the dialog.
86 void OnConnectionTerminated(); 90 void OnConnectionTerminated();
87 91
88 // Called when the user clicks on the "Pay" button. 92 // Called when the user clicks on the "Pay" button.
89 void Pay(); 93 void Pay();
90 94
91 content::WebContents* web_contents() { return web_contents_; } 95 content::WebContents* web_contents() { return web_contents_; }
(...skipping 14 matching lines...) Expand all
106 110
107 // The RFC 6454 origin of the frame that has invoked PaymentRequest API. This 111 // The RFC 6454 origin of the frame that has invoked PaymentRequest API. This
108 // can be either the main frame or an iframe. 112 // can be either the main frame or an iframe.
109 const GURL frame_origin_; 113 const GURL frame_origin_;
110 114
111 // May be null, must outlive this object. 115 // May be null, must outlive this object.
112 ObserverForTest* observer_for_testing_; 116 ObserverForTest* observer_for_testing_;
113 117
114 JourneyLogger journey_logger_; 118 JourneyLogger journey_logger_;
115 119
120 bool has_recorded_abort_reason_ = false;
121
116 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); 122 DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
117 }; 123 };
118 124
119 } // namespace payments 125 } // namespace payments
120 126
121 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 127 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698