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

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

Issue 2668063003: [Web Payments] Add Cancel button to all sheets (Closed)
Patch Set: 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: chrome/browser/ui/views/payments/payment_request_views_util.h
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.h b/chrome/browser/ui/views/payments/payment_request_views_util.h
index 13e250614e9a4e19fa1678f90432b847426be79c..f699c5b8ab29b275c6f17d52b2c630879d00a0ba 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.h
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.h
@@ -22,6 +22,8 @@ class View;
namespace payments {
+class PaymentRequestSheetController;
+
constexpr int kPaymentRequestRowHorizontalInsets = 14;
constexpr int kPaymentRequestRowVerticalInsets = 8;
@@ -57,11 +59,12 @@ std::unique_ptr<views::View> CreateSheetHeaderView(
// | CONTENT |
// | VIEW |
// +---------------------------+
-// | | CANCEL | PAY |
+// | | CANCEL | PAY | <-- |buttons_view|
// +---------------------------+
std::unique_ptr<views::View> CreatePaymentView(
std::unique_ptr<views::View> header_view,
- std::unique_ptr<views::View> content_view);
+ std::unique_ptr<views::View> content_view,
+ std::unique_ptr<views::View> buttons_view);
// Represents formatting options for each of the different contexts in which an
// Address label may be displayed.
@@ -89,6 +92,11 @@ std::unique_ptr<views::View> GetContactInfoLabel(
// as a separator between items in the Payment Request dialog.
std::unique_ptr<views::Border> CreatePaymentRequestRowBorder();
+// Creates the row of button containing the Pay, cancel, and extra buttons.
+// |controller| is installed as the listener for button events.
+std::unique_ptr<views::View> CreateButtonsView(
+ PaymentRequestSheetController* controller);
+
} // namespace payments
#endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698