| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Creates a views::Border object with |insets| that can paint the gray | 118 // Creates a views::Border object with |insets| that can paint the gray |
| 119 // horizontal ruler used as a separator between items in the Payment Request | 119 // horizontal ruler used as a separator between items in the Payment Request |
| 120 // dialog. | 120 // dialog. |
| 121 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder( | 121 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder( |
| 122 SkColor color, | 122 SkColor color, |
| 123 const gfx::Insets& insets); | 123 const gfx::Insets& insets); |
| 124 | 124 |
| 125 // Creates a label with a bold font. | 125 // Creates a label with a bold font. |
| 126 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); | 126 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); |
| 127 | 127 |
| 128 // Creates a label with a medium-weight font, with appropriate fallbacks for |
| 129 // platforms that have no medium font, or where a user has configured their |
| 130 // default font with a heavier weight. |
| 131 std::unique_ptr<views::Label> CreateMediumLabel(const base::string16& text); |
| 132 |
| 128 // Creates a 2 line label containing |shipping_option|'s label and amount. If | 133 // Creates a 2 line label containing |shipping_option|'s label and amount. If |
| 129 // |emphasize_label| is true, the label part will be in medium weight. | 134 // |emphasize_label| is true, the label part will be in medium weight. |
| 130 std::unique_ptr<views::View> CreateShippingOptionLabel( | 135 std::unique_ptr<views::View> CreateShippingOptionLabel( |
| 131 payments::mojom::PaymentShippingOption* shipping_option, | 136 payments::mojom::PaymentShippingOption* shipping_option, |
| 132 const base::string16& formatted_amount, | 137 const base::string16& formatted_amount, |
| 133 bool emphasize_label); | 138 bool emphasize_label); |
| 134 | 139 |
| 135 } // namespace payments | 140 } // namespace payments |
| 136 | 141 |
| 137 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 142 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
| OLD | NEW |