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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const autofill::AutofillProfile& profile); | 72 const autofill::AutofillProfile& profile); |
73 | 73 |
74 // Extracts and formats descriptive text from the given |profile| to represent | 74 // Extracts and formats descriptive text from the given |profile| to represent |
75 // the contact info in the context specified by |type|. Includes/excludes name, | 75 // the contact info in the context specified by |type|. Includes/excludes name, |
76 // email, and phone fields according to the respective boolean fields. | 76 // email, and phone fields according to the respective boolean fields. |
77 std::unique_ptr<views::View> GetContactInfoLabel( | 77 std::unique_ptr<views::View> GetContactInfoLabel( |
78 AddressStyleType type, | 78 AddressStyleType type, |
79 const std::string& locale, | 79 const std::string& locale, |
80 const autofill::AutofillProfile& profile, | 80 const autofill::AutofillProfile& profile, |
81 bool show_payer_name, | 81 bool show_payer_name, |
82 bool show_payer_email, | 82 bool show_payer_phone, |
83 bool show_payer_phone); | 83 bool show_payer_email); |
84 | 84 |
85 // Creates a views::Border object that can paint the gray horizontal ruler used | 85 // Creates a views::Border object that can paint the gray horizontal ruler used |
86 // as a separator between items in the Payment Request dialog. | 86 // as a separator between items in the Payment Request dialog. |
87 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); | 87 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); |
88 | 88 |
89 // Creates a label with a bold font. | 89 // Creates a label with a bold font. |
90 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); | 90 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); |
91 | 91 |
92 base::string16 GetShippingAddressSectionString( | 92 base::string16 GetShippingAddressSectionString( |
93 payments::mojom::PaymentShippingType shipping_type); | 93 payments::mojom::PaymentShippingType shipping_type); |
94 base::string16 GetShippingOptionSectionString( | 94 base::string16 GetShippingOptionSectionString( |
95 payments::mojom::PaymentShippingType shipping_type); | 95 payments::mojom::PaymentShippingType shipping_type); |
96 | 96 |
97 } // namespace payments | 97 } // namespace payments |
98 | 98 |
99 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 99 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
OLD | NEW |