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

Unified Diff: components/payments/payment_request_dialog.h

Issue 2649683002: [Payments] Improve the closing of the PR dialog. (Closed)
Patch Set: Initial 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
Index: components/payments/payment_request_dialog.h
diff --git a/components/payments/payment_request_dialog.h b/components/payments/payment_request_dialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..eff68612c57bfe702447da115187141797318a73
--- /dev/null
+++ b/components/payments/payment_request_dialog.h
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
+#define COMPONENTS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
+
+namespace payments {
+
+// Used to interact with a cross-platform Payment Request dialog.
+class PaymentRequestDialog {
+ public:
+ virtual ~PaymentRequestDialog() {}
+
+ virtual void ShowDialog() = 0;
+
+ // |propagate_to_renderer| indicates whether to warn the renderer of the
+ // dialog closure. Therefore, if the dialog is being closed as a result of a
+ // renderer event, |propagate_to_renderer| should be false (the renderer is
+ // aware). On the other hand if the dialog is closed due to a user gesture,
+ // the renderer needs to know.
+ virtual void CloseDialog(bool propagate_to_renderer) = 0;
+};
+
+} // namespace payments
+
+#endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
« components/payments/payment_request.cc ('K') | « components/payments/payment_request_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698