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

Unified Diff: components/payments/payment_request.h

Issue 2649683002: [Payments] Improve the closing of the PR dialog. (Closed)
Patch Set: addressed comments from sky Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/payments/BUILD.gn ('k') | components/payments/payment_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/payment_request.h
diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h
index 6c55cca9ae4910cb4377dfa08fdf5251239c8fc6..61077b297f5d7ae5c1b94a58067f1f5c9783e2fd 100644
--- a/components/payments/payment_request.h
+++ b/components/payments/payment_request.h
@@ -43,12 +43,20 @@ class PaymentRequest : payments::mojom::PaymentRequest {
payments::mojom::PaymentOptionsPtr options) override;
void Show() override;
void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {}
- void Abort() override {}
+ void Abort() override;
void Complete(payments::mojom::PaymentComplete result) override {}
void CanMakePayment() override {}
- void Cancel();
- void OnError();
+ // Called when the user explicitely cancelled the flow. Will send a message
+ // to the renderer which will indirectly destroy this object (through
+ // OnConnectionTerminated).
+ void UserCancelled();
+
+ // As a result of a browser-side error or renderer-initiated mojo channel
+ // closure (e.g. there was an error on the renderer side, or payment was
+ // successful), this method is called. It is responsible for cleaning up,
+ // such as possibly closing the dialog.
+ void OnConnectionTerminated();
// Returns the CurrencyFormatter instance for this PaymentRequest.
// |locale_name| should be the result of the browser's GetApplicationLocale().
« no previous file with comments | « components/payments/BUILD.gn ('k') | components/payments/payment_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698