OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 constexpr int kPaymentRequestRowHorizontalInsets = 16; | 33 constexpr int kPaymentRequestRowHorizontalInsets = 16; |
34 constexpr int kPaymentRequestRowVerticalInsets = 8; | 34 constexpr int kPaymentRequestRowVerticalInsets = 8; |
35 | 35 |
36 // Extra inset relative to the header when a right edge should line up with the | 36 // Extra inset relative to the header when a right edge should line up with the |
37 // close button's X rather than its invisible right edge. | 37 // close button's X rather than its invisible right edge. |
38 constexpr int kPaymentRequestRowExtraRightInset = 8; | 38 constexpr int kPaymentRequestRowExtraRightInset = 8; |
39 constexpr int kPaymentRequestButtonSpacing = 10; | 39 constexpr int kPaymentRequestButtonSpacing = 10; |
40 | 40 |
41 // Dimensions of the dialog itself. | 41 // Dimensions of the dialog itself. |
| 42 constexpr int kDialogMinWidth = 512; |
42 constexpr int kDialogHeight = 450; | 43 constexpr int kDialogHeight = 450; |
43 | 44 |
44 // Fixed width of the amount sections in the payment sheet and the order summary | 45 // Fixed width of the amount sections in the payment sheet and the order summary |
45 // sheet, in pixels. | 46 // sheet, in pixels. |
46 constexpr int kAmountSectionWidth = 96; | 47 constexpr int kAmountSectionWidth = 96; |
47 | 48 |
48 enum class PaymentRequestCommonTags { | 49 enum class PaymentRequestCommonTags { |
49 BACK_BUTTON_TAG = 0, | 50 BACK_BUTTON_TAG = 0, |
50 CLOSE_BUTTON_TAG, | 51 CLOSE_BUTTON_TAG, |
51 PAY_BUTTON_TAG, | 52 PAY_BUTTON_TAG, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Creates a 2 line label containing |shipping_option|'s label and amount. If | 124 // Creates a 2 line label containing |shipping_option|'s label and amount. If |
124 // |emphasize_label| is true, the label part will be in medium weight. | 125 // |emphasize_label| is true, the label part will be in medium weight. |
125 std::unique_ptr<views::View> CreateShippingOptionLabel( | 126 std::unique_ptr<views::View> CreateShippingOptionLabel( |
126 payments::mojom::PaymentShippingOption* shipping_option, | 127 payments::mojom::PaymentShippingOption* shipping_option, |
127 const base::string16& formatted_amount, | 128 const base::string16& formatted_amount, |
128 bool emphasize_label); | 129 bool emphasize_label); |
129 | 130 |
130 } // namespace payments | 131 } // namespace payments |
131 | 132 |
132 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
OLD | NEW |