Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_views_util.h

Issue 2757523002: [Payments] Use PaymentInstrument/AutofillPaymentInstrument throughout. (Closed)
Patch Set: addressed nits Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // true), a |title| label. |delegate| becomes the delegate for the back and 48 // true), a |title| label. |delegate| becomes the delegate for the back and
49 // close buttons. 49 // close buttons.
50 // +---------------------------+ 50 // +---------------------------+
51 // | <- | Title | 51 // | <- | Title |
52 // +---------------------------+ 52 // +---------------------------+
53 std::unique_ptr<views::View> CreateSheetHeaderView( 53 std::unique_ptr<views::View> CreateSheetHeaderView(
54 bool show_back_arrow, 54 bool show_back_arrow,
55 const base::string16& title, 55 const base::string16& title,
56 views::VectorIconButtonDelegate* delegate); 56 views::VectorIconButtonDelegate* delegate);
57 57
58 // Returns a card image view for the given |card_type|. Includes a rounded rect 58 // Returns an instrument image view for the given |icon_resource_id|. Includes
59 // border. Callers need to set the size of the resulting ImageView. 59 // a rounded rect border. Callers need to set the size of the resulting
60 std::unique_ptr<views::ImageView> CreateCardIconView( 60 // ImageView. Callers should set a |tooltip_text|.
61 const std::string& card_type); 61 std::unique_ptr<views::ImageView> CreateInstrumentIconView(
62 int icon_resource_id,
63 const base::string16& tooltip_text);
62 64
63 // Represents formatting options for each of the different contexts in which an 65 // Represents formatting options for each of the different contexts in which an
64 // Address label may be displayed. 66 // Address label may be displayed.
65 enum class AddressStyleType { SUMMARY, DETAILED }; 67 enum class AddressStyleType { SUMMARY, DETAILED };
66 68
67 // Extracts and formats descriptive text from the given |profile| to represent 69 // Extracts and formats descriptive text from the given |profile| to represent
68 // the address in the context specified by |type|. 70 // the address in the context specified by |type|.
69 std::unique_ptr<views::View> GetShippingAddressLabel( 71 std::unique_ptr<views::View> GetShippingAddressLabel(
70 AddressStyleType type, 72 AddressStyleType type,
71 const std::string& locale, 73 const std::string& locale,
(...skipping 22 matching lines...) Expand all
94 base::string16 GetShippingOptionSectionString( 96 base::string16 GetShippingOptionSectionString(
95 payments::mojom::PaymentShippingType shipping_type); 97 payments::mojom::PaymentShippingType shipping_type);
96 98
97 std::unique_ptr<views::View> CreateShippingOptionLabel( 99 std::unique_ptr<views::View> CreateShippingOptionLabel(
98 payments::mojom::PaymentShippingOption* shipping_option, 100 payments::mojom::PaymentShippingOption* shipping_option,
99 const base::string16& formatted_amount); 101 const base::string16& formatted_amount);
100 102
101 } // namespace payments 103 } // namespace payments
102 104
103 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 105 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698