| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // +---------------------------+ | 43 // +---------------------------+ |
| 44 std::unique_ptr<views::View> CreateSheetHeaderView( | 44 std::unique_ptr<views::View> CreateSheetHeaderView( |
| 45 bool show_back_arrow, | 45 bool show_back_arrow, |
| 46 const base::string16& title, | 46 const base::string16& title, |
| 47 views::VectorIconButtonDelegate* delegate); | 47 views::VectorIconButtonDelegate* delegate); |
| 48 | 48 |
| 49 // Creates a view to be displayed in the PaymentRequestDialog. | 49 // Creates a view to be displayed in the PaymentRequestDialog. |
| 50 // |header_view| is the view displayed on top of the dialog, containing title, | 50 // |header_view| is the view displayed on top of the dialog, containing title, |
| 51 // (optional) back button, and close buttons. | 51 // (optional) back button, and close buttons. |
| 52 // |content_view| is displayed between |header_view| and the pay/cancel buttons. | 52 // |content_view| is displayed between |header_view| and the pay/cancel buttons. |
| 53 // The returned view takes ownership of |header_view| and |content_view|. | 53 // |buttons_view| is clamped to the bottom of the containing view. |
| 54 // The returned view takes ownership of |header_view|, |content_view|, and |
| 55 // |buttons_view|. |
| 54 // +---------------------------+ | 56 // +---------------------------+ |
| 55 // | HEADER VIEW | | 57 // | HEADER VIEW | |
| 56 // +---------------------------+ | 58 // +---------------------------+ |
| 57 // | CONTENT | | 59 // | CONTENT | |
| 58 // | VIEW | | 60 // | VIEW | |
| 59 // +---------------------------+ | 61 // +---------------------------+ |
| 60 // | | CANCEL | PAY | | 62 // | | CANCEL | PAY | <-- |buttons_view| |
| 61 // +---------------------------+ | 63 // +---------------------------+ |
| 62 std::unique_ptr<views::View> CreatePaymentView( | 64 std::unique_ptr<views::View> CreatePaymentView( |
| 63 std::unique_ptr<views::View> header_view, | 65 std::unique_ptr<views::View> header_view, |
| 64 std::unique_ptr<views::View> content_view); | 66 std::unique_ptr<views::View> content_view, |
| 67 std::unique_ptr<views::View> buttons_view); |
| 65 | 68 |
| 66 // Represents formatting options for each of the different contexts in which an | 69 // Represents formatting options for each of the different contexts in which an |
| 67 // Address label may be displayed. | 70 // Address label may be displayed. |
| 68 enum class AddressStyleType { SUMMARY, DETAILED }; | 71 enum class AddressStyleType { SUMMARY, DETAILED }; |
| 69 | 72 |
| 70 // Extracts and formats descriptive text from the given |profile| to represent | 73 // Extracts and formats descriptive text from the given |profile| to represent |
| 71 // the address in the context specified by |type|. | 74 // the address in the context specified by |type|. |
| 72 std::unique_ptr<views::View> GetShippingAddressLabel( | 75 std::unique_ptr<views::View> GetShippingAddressLabel( |
| 73 AddressStyleType type, | 76 AddressStyleType type, |
| 74 const std::string& locale, | 77 const std::string& locale, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 85 bool show_payer_email, | 88 bool show_payer_email, |
| 86 bool show_payer_phone); | 89 bool show_payer_phone); |
| 87 | 90 |
| 88 // Creates a views::Border object that can paint the gray horizontal ruler used | 91 // Creates a views::Border object that can paint the gray horizontal ruler used |
| 89 // as a separator between items in the Payment Request dialog. | 92 // as a separator between items in the Payment Request dialog. |
| 90 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); | 93 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); |
| 91 | 94 |
| 92 } // namespace payments | 95 } // namespace payments |
| 93 | 96 |
| 94 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 97 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
| OLD | NEW |