| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 constexpr int kPaymentRequestRowHorizontalInsets = 16; | 34 constexpr int kPaymentRequestRowHorizontalInsets = 16; |
| 35 constexpr int kPaymentRequestRowVerticalInsets = 8; | 35 constexpr int kPaymentRequestRowVerticalInsets = 8; |
| 36 | 36 |
| 37 // Extra inset relative to the header when a right edge should line up with the | 37 // Extra inset relative to the header when a right edge should line up with the |
| 38 // close button's X rather than its invisible right edge. | 38 // close button's X rather than its invisible right edge. |
| 39 constexpr int kPaymentRequestRowExtraRightInset = 8; | 39 constexpr int kPaymentRequestRowExtraRightInset = 8; |
| 40 constexpr int kPaymentRequestButtonSpacing = 10; | 40 constexpr int kPaymentRequestButtonSpacing = 10; |
| 41 | 41 |
| 42 // Dimensions of the dialog itself. | 42 // Dimensions of the dialog itself. |
| 43 constexpr int kDialogMinWidth = 512; |
| 43 constexpr int kDialogHeight = 450; | 44 constexpr int kDialogHeight = 450; |
| 44 | 45 |
| 45 // Fixed width of the amount sections in the payment sheet and the order summary | 46 // Fixed width of the amount sections in the payment sheet and the order summary |
| 46 // sheet, in pixels. | 47 // sheet, in pixels. |
| 47 constexpr int kAmountSectionWidth = 96; | 48 constexpr int kAmountSectionWidth = 96; |
| 48 | 49 |
| 49 enum class PaymentRequestCommonTags { | 50 enum class PaymentRequestCommonTags { |
| 50 BACK_BUTTON_TAG = 0, | 51 BACK_BUTTON_TAG = 0, |
| 51 CLOSE_BUTTON_TAG, | 52 CLOSE_BUTTON_TAG, |
| 52 PAY_BUTTON_TAG, | 53 PAY_BUTTON_TAG, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Creates a 2 line label containing |shipping_option|'s label and amount. If | 128 // Creates a 2 line label containing |shipping_option|'s label and amount. If |
| 128 // |emphasize_label| is true, the label part will be in medium weight. | 129 // |emphasize_label| is true, the label part will be in medium weight. |
| 129 std::unique_ptr<views::View> CreateShippingOptionLabel( | 130 std::unique_ptr<views::View> CreateShippingOptionLabel( |
| 130 payments::mojom::PaymentShippingOption* shipping_option, | 131 payments::mojom::PaymentShippingOption* shipping_option, |
| 131 const base::string16& formatted_amount, | 132 const base::string16& formatted_amount, |
| 132 bool emphasize_label); | 133 bool emphasize_label); |
| 133 | 134 |
| 134 } // namespace payments | 135 } // namespace payments |
| 135 | 136 |
| 136 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 137 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
| OLD | NEW |