| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 const base::string16& title, | 55 const base::string16& title, |
| 56 views::ButtonListener* delegate); | 56 views::ButtonListener* delegate); |
| 57 | 57 |
| 58 // Returns an instrument image view for the given |icon_resource_id|. Includes | 58 // Returns an instrument image view for the given |icon_resource_id|. Includes |
| 59 // a rounded rect border. Callers need to set the size of the resulting | 59 // a rounded rect border. Callers need to set the size of the resulting |
| 60 // ImageView. Callers should set a |tooltip_text|. | 60 // ImageView. Callers should set a |tooltip_text|. |
| 61 std::unique_ptr<views::ImageView> CreateInstrumentIconView( | 61 std::unique_ptr<views::ImageView> CreateInstrumentIconView( |
| 62 int icon_resource_id, | 62 int icon_resource_id, |
| 63 const base::string16& tooltip_text); | 63 const base::string16& tooltip_text); |
| 64 | 64 |
| 65 std::unique_ptr<views::View> CreateProductLogoFooterView(); |
| 66 |
| 65 // Represents formatting options for each of the different contexts in which an | 67 // Represents formatting options for each of the different contexts in which an |
| 66 // Address label may be displayed. | 68 // Address label may be displayed. |
| 67 enum class AddressStyleType { SUMMARY, DETAILED }; | 69 enum class AddressStyleType { SUMMARY, DETAILED }; |
| 68 | 70 |
| 69 // Extracts and formats descriptive text from the given |profile| to represent | 71 // Extracts and formats descriptive text from the given |profile| to represent |
| 70 // the address in the context specified by |type|. | 72 // the address in the context specified by |type|. |
| 71 std::unique_ptr<views::View> GetShippingAddressLabel( | 73 std::unique_ptr<views::View> GetShippingAddressLabel( |
| 72 AddressStyleType type, | 74 AddressStyleType type, |
| 73 const std::string& locale, | 75 const std::string& locale, |
| 74 const autofill::AutofillProfile& profile); | 76 const autofill::AutofillProfile& profile); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 96 base::string16 GetShippingOptionSectionString( | 98 base::string16 GetShippingOptionSectionString( |
| 97 payments::mojom::PaymentShippingType shipping_type); | 99 payments::mojom::PaymentShippingType shipping_type); |
| 98 | 100 |
| 99 std::unique_ptr<views::View> CreateShippingOptionLabel( | 101 std::unique_ptr<views::View> CreateShippingOptionLabel( |
| 100 payments::mojom::PaymentShippingOption* shipping_option, | 102 payments::mojom::PaymentShippingOption* shipping_option, |
| 101 const base::string16& formatted_amount); | 103 const base::string16& formatted_amount); |
| 102 | 104 |
| 103 } // namespace payments | 105 } // namespace payments |
| 104 | 106 |
| 105 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 107 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
| OLD | NEW |