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

Unified Diff: chrome/browser/ui/views/payments/payment_request_dialog.h

Issue 2631133003: [Payments] Introduce basic interactive browsertests for Payment Request (Closed)
Patch Set: ObserverForTest 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 | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/payments/payment_request_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/payment_request_dialog.h
diff --git a/chrome/browser/ui/views/payments/payment_request_dialog.h b/chrome/browser/ui/views/payments/payment_request_dialog.h
index d11f413120d9a1d4edd6b37b088e4febbcec9ccd..e4f2ed16c6a0e88fd48166b4f3d95aee8a2e8f13 100644
--- a/chrome/browser/ui/views/payments/payment_request_dialog.h
+++ b/chrome/browser/ui/views/payments/payment_request_dialog.h
@@ -28,7 +28,16 @@ using ControllerMap =
// the WebPayments flow and managing the transition between those states.
class PaymentRequestDialog : public views::DialogDelegateView {
public:
- explicit PaymentRequestDialog(PaymentRequest* request);
+ class ObserverForTest {
+ public:
+ virtual void OnDialogOpened() = 0;
+ };
+
+ // Build a Dialog around the PaymentRequest object. |observer| is used to
+ // be notified of dialog events as they happen (but may be NULL) and should
+ // outlive this object.
+ PaymentRequestDialog(PaymentRequest* request,
+ PaymentRequestDialog::ObserverForTest* observer);
~PaymentRequestDialog() override;
// views::WidgetDelegate
@@ -44,6 +53,9 @@ class PaymentRequestDialog : public views::DialogDelegateView {
void ShowPaymentMethodSheet();
void CloseDialog();
+ static void ShowWebModalPaymentDialog(PaymentRequestDialog* dialog,
+ PaymentRequest* request);
+
private:
void ShowInitialPaymentSheet();
@@ -57,6 +69,8 @@ class PaymentRequestDialog : public views::DialogDelegateView {
// always be valid even though there is no direct ownership relationship
// between the two.
PaymentRequest* request_;
+ // May be null.
+ ObserverForTest* observer_;
ControllerMap controller_map_;
ViewStack view_stack_;
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/payments/payment_request_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698