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

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

Issue 2896263002: [Payments] Changes to validation in the Credit Card editor (Closed)
Patch Set: rebase Created 3 years, 7 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // true), a |title| label. |delegate| becomes the delegate for the back and 64 // true), a |title| label. |delegate| becomes the delegate for the back and
65 // close buttons. 65 // close buttons.
66 // +---------------------------+ 66 // +---------------------------+
67 // | <- | Title | 67 // | <- | Title |
68 // +---------------------------+ 68 // +---------------------------+
69 std::unique_ptr<views::View> CreateSheetHeaderView( 69 std::unique_ptr<views::View> CreateSheetHeaderView(
70 bool show_back_arrow, 70 bool show_back_arrow,
71 const base::string16& title, 71 const base::string16& title,
72 views::ButtonListener* delegate); 72 views::ButtonListener* delegate);
73 73
74 // Returns an instrument image view for the given |icon_resource_id|. Includes 74 // Returns an instrument image view for the given |icon_resource_id| and wanted
75 // a rounded rect border. Callers need to set the size of the resulting 75 // |opacity|. Includes a rounded rect border. Callers need to set the size of
76 // ImageView. Callers should set a |tooltip_text|. 76 // the resulting ImageView. Callers should set a |tooltip_text|.
77 std::unique_ptr<views::ImageView> CreateInstrumentIconView( 77 std::unique_ptr<views::ImageView> CreateInstrumentIconView(
78 int icon_resource_id, 78 int icon_resource_id,
79 const base::string16& tooltip_text); 79 const base::string16& tooltip_text,
80 float opacity = 1.0f);
80 81
81 std::unique_ptr<views::View> CreateProductLogoFooterView(); 82 std::unique_ptr<views::View> CreateProductLogoFooterView();
82 83
83 // Represents formatting options for each of the different contexts in which an 84 // Represents formatting options for each of the different contexts in which an
84 // Address label may be displayed. 85 // Address label may be displayed.
85 enum class AddressStyleType { SUMMARY, DETAILED }; 86 enum class AddressStyleType { SUMMARY, DETAILED };
86 87
87 // Extracts and formats descriptive text from the given |profile| to represent 88 // Extracts and formats descriptive text from the given |profile| to represent
88 // the address in the context specified by |type|. If |error| is specified, 89 // the address in the context specified by |type|. If |error| is specified,
89 // this will display it as the last item in an error state. |disabled_state| 90 // this will display it as the last item in an error state. |disabled_state|
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Creates a 2 line label containing |shipping_option|'s label and amount. If 134 // Creates a 2 line label containing |shipping_option|'s label and amount. If
134 // |emphasize_label| is true, the label part will be in medium weight. 135 // |emphasize_label| is true, the label part will be in medium weight.
135 std::unique_ptr<views::View> CreateShippingOptionLabel( 136 std::unique_ptr<views::View> CreateShippingOptionLabel(
136 payments::mojom::PaymentShippingOption* shipping_option, 137 payments::mojom::PaymentShippingOption* shipping_option,
137 const base::string16& formatted_amount, 138 const base::string16& formatted_amount,
138 bool emphasize_label); 139 bool emphasize_label);
139 140
140 } // namespace payments 141 } // namespace payments
141 142
142 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 143 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698