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

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

Issue 2529733002: [WebPayments] Move views-specific code to c/b/ui/views/ (Closed)
Patch Set: Rebase Created 4 years 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/browser_dialogs.h ('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
new file mode 100644
index 0000000000000000000000000000000000000000..6a08d698dc21b5e6ab5c551978a5fc29ac9c1b22
--- /dev/null
+++ b/chrome/browser/ui/views/payments/payment_request_dialog.h
@@ -0,0 +1,45 @@
+// Copyright 2016 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 CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
+#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
+
+#include "ui/views/controls/label.h"
+#include "ui/views/window/dialog_delegate.h"
+
+namespace payments {
+
+class PaymentRequestImpl;
+
+// The dialog delegate that represents a desktop WebPayments dialog. This class
+// is responsible for displaying the view associated with the current state of
+// the WebPayments flow and managing the transition between those states.
+class PaymentRequestDialog : public views::DialogDelegateView {
+ public:
+ explicit PaymentRequestDialog(PaymentRequestImpl* impl);
+ ~PaymentRequestDialog() override;
+
+ // views::WidgetDelegate:
+ ui::ModalType GetModalType() const override;
+
+ // views::View:
+ gfx::Size GetPreferredSize() const override;
+
+ // views::DialogDelegate:
+ bool Cancel() override;
+
+ private:
+ // Non-owned reference to the PaymentRequestImpl that initiated this dialog.
+ // Since the PaymentRequestImpl object always outlives this one, the pointer
+ // should always be valid even though there is no direct ownership
+ // relationship between the two.
+ PaymentRequestImpl* impl_;
+ std::unique_ptr<views::Label> label_;
+
+ DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog);
+};
+
+} // namespace payments
+
+#endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('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