Chromium Code Reviews| 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 | 10 |
| 10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "components/autofill/core/browser/autofill_profile.h" | |
|
please use gerrit instead
2017/01/18 18:50:47
Forward-declare instead, please.
tmartino
2017/01/18 20:39:13
Done
| |
| 11 | 13 |
| 12 namespace views { | 14 namespace views { |
| 13 class VectorIconButtonDelegate; | 15 class VectorIconButtonDelegate; |
| 14 class View; | 16 class View; |
| 15 } | 17 } |
| 16 | 18 |
| 17 namespace payments { | 19 namespace payments { |
| 18 | 20 |
| 19 enum class PaymentRequestCommonTags { | 21 enum class PaymentRequestCommonTags { |
| 20 BACK_BUTTON_TAG = 0, | 22 BACK_BUTTON_TAG = 0, |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 47 // +---------------------------+ | 49 // +---------------------------+ |
| 48 // | CONTENT | | 50 // | CONTENT | |
| 49 // | VIEW | | 51 // | VIEW | |
| 50 // +---------------------------+ | 52 // +---------------------------+ |
| 51 // | | CANCEL | PAY | | 53 // | | CANCEL | PAY | |
| 52 // +---------------------------+ | 54 // +---------------------------+ |
| 53 std::unique_ptr<views::View> CreatePaymentView( | 55 std::unique_ptr<views::View> CreatePaymentView( |
| 54 std::unique_ptr<views::View> header_view, | 56 std::unique_ptr<views::View> header_view, |
| 55 std::unique_ptr<views::View> content_view); | 57 std::unique_ptr<views::View> content_view); |
| 56 | 58 |
| 59 // Represents formatting options for each of the different contexts in which an | |
| 60 // Address label may be displayed. | |
| 61 enum class AddressStyleType { SUMMARY, DETAILED }; | |
| 62 | |
| 63 // Extracts and formats descriptive text from the given |profile| to represent | |
| 64 // the address in the context specified by |type|. | |
| 65 std::unique_ptr<views::View> GetShippingAddressLabel( | |
| 66 AddressStyleType type, | |
| 67 std::string locale, | |
|
please use gerrit instead
2017/01/18 18:50:47
const-ref
tmartino
2017/01/18 20:39:13
Done to all
| |
| 68 autofill::AutofillProfile* profile); | |
|
please use gerrit instead
2017/01/18 18:50:47
const-ref
| |
| 69 | |
| 70 // Extracts and formats descriptive text from the given |profile| to represent | |
| 71 // the contact info in the context specified by |type|. Includes/excludes name, | |
| 72 // email, and phone fields according to the respective boolean fields. | |
| 73 std::unique_ptr<views::View> GetContactInfoLabel( | |
| 74 AddressStyleType type, | |
| 75 std::string locale, | |
|
please use gerrit instead
2017/01/18 18:50:47
const-ref
| |
| 76 autofill::AutofillProfile* profile, | |
|
please use gerrit instead
2017/01/18 18:50:47
const-ref
| |
| 77 bool show_payer_name, | |
| 78 bool show_payer_email, | |
| 79 bool show_payer_phone); | |
| 80 | |
| 57 } // namespace payments | 81 } // namespace payments |
| 58 | 82 |
| 59 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ | 83 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ |
| OLD | NEW |