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

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

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: check details 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
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "components/payments/content/payment_request.mojom.h" 12 #include "components/payments/content/payment_request.mojom.h"
13 13
14 namespace autofill { 14 namespace autofill {
15 class AutofillProfile; 15 class AutofillProfile;
16 } 16 }
17 17
18 namespace views { 18 namespace views {
19 class Border; 19 class Border;
20 class ButtonListener;
20 class ImageView; 21 class ImageView;
21 class Label; 22 class Label;
22 class VectorIconButtonDelegate;
23 class View; 23 class View;
24 } 24 }
25 25
26 namespace payments { 26 namespace payments {
27 27
28 constexpr int kPaymentRequestRowHorizontalInsets = 16; 28 constexpr int kPaymentRequestRowHorizontalInsets = 16;
29 constexpr int kPaymentRequestRowVerticalInsets = 8; 29 constexpr int kPaymentRequestRowVerticalInsets = 8;
30 30
31 // Extra inset relative to the header when a right edge should line up with the 31 // Extra inset relative to the header when a right edge should line up with the
32 // close button's X rather than its invisible right edge. 32 // close button's X rather than its invisible right edge.
(...skipping 13 matching lines...) Expand all
46 // Creates and returns a header for all the sheets in the PaymentRequest dialog. 46 // Creates and returns a header for all the sheets in the PaymentRequest dialog.
47 // The header contains an optional back arrow button (if |show_back_arrow| is 47 // The header contains an optional back arrow button (if |show_back_arrow| is
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::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 // 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
66 // Address label may be displayed. 66 // Address label may be displayed.
(...skipping 29 matching lines...) Expand all
96 base::string16 GetShippingOptionSectionString( 96 base::string16 GetShippingOptionSectionString(
97 payments::mojom::PaymentShippingType shipping_type); 97 payments::mojom::PaymentShippingType shipping_type);
98 98
99 std::unique_ptr<views::View> CreateShippingOptionLabel( 99 std::unique_ptr<views::View> CreateShippingOptionLabel(
100 payments::mojom::PaymentShippingOption* shipping_option, 100 payments::mojom::PaymentShippingOption* shipping_option,
101 const base::string16& formatted_amount); 101 const base::string16& formatted_amount);
102 102
103 } // namespace payments 103 } // namespace payments
104 104
105 #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