| 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 5d9b6b90ea1d2be6faa2ab80f572f5d8c9e03ccd..d72f6eadbc59ab10c074b4adeed19e3b13f1f9a9 100644
|
| --- a/chrome/browser/ui/views/payments/payment_request_views_util.h
|
| +++ b/chrome/browser/ui/views/payments/payment_request_views_util.h
|
| @@ -10,17 +10,49 @@
|
| #include "base/strings/string16.h"
|
|
|
| namespace views {
|
| +class VectorIconButtonDelegate;
|
| class View;
|
| }
|
|
|
| namespace payments {
|
|
|
| -// Creates a view to be displayed in the PaymentRequestDialog. |title| is the
|
| -// text displayed on top of the dialog and |content_view| is displayed between
|
| -// the title and the pay/cancel buttons. The returned view takes ownership of
|
| -// |content_view|.
|
| +enum class PaymentRequestCommonTags {
|
| + BACK_BUTTON_TAG = 0,
|
| + CLOSE_BUTTON_TAG,
|
| + // This is the max value of tags for controls common to multiple
|
| + // PaymentRequest contexts. Individual screens that handle both common and
|
| + // specific events with tags can start their specific tags at this value.
|
| + PAYMENT_REQUEST_COMMON_TAG_MAX
|
| +};
|
| +
|
| +// Creates and returns a header for all the sheets in the PaymentRequest dialog.
|
| +// The header contains an optional back arrow button (if |show_back_arrow| is
|
| +// true), a |title| label, and a right-aligned X close button. |delegate|
|
| +// becomes the delegate for the back and close buttons.
|
| +// +---------------------------+
|
| +// | <- | Title | X |
|
| +// +---------------------------+
|
| +std::unique_ptr<views::View> CreateSheetHeaderView(
|
| + bool show_back_arrow,
|
| + const base::string16& title,
|
| + views::VectorIconButtonDelegate* delegate);
|
| +
|
| +// Creates a view to be displayed in the PaymentRequestDialog.
|
| +// |header_view| is the view displayed on top of the dialog, containing title,
|
| +// (optional) back button, and close buttons.
|
| +// |content_view| is displayed between |header_view| and the pay/cancel buttons.
|
| +// The returned view takes ownership of |header_view| and |content_view|.
|
| +// +---------------------------+
|
| +// | HEADER VIEW |
|
| +// +---------------------------+
|
| +// | CONTENT |
|
| +// | VIEW |
|
| +// +---------------------------+
|
| +// | | CANCEL | PAY |
|
| +// +---------------------------+
|
| std::unique_ptr<views::View> CreatePaymentView(
|
| - const base::string16& title, std::unique_ptr<views::View> content_view);
|
| + std::unique_ptr<views::View> header_view,
|
| + std::unique_ptr<views::View> content_view);
|
|
|
| } // namespace payments
|
|
|
|
|