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

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

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: fix cros build 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 12
13 namespace autofill { 13 namespace autofill {
14 class AutofillProfile; 14 class AutofillProfile;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 class Border; 18 class Border;
19 class ImageView; 19 class ImageView;
20 class Label; 20 class Label;
21 class VectorIconButtonDelegate; 21 class ImageButtonDelegate;
22 class View; 22 class View;
23 } 23 }
24 24
25 namespace payments { 25 namespace payments {
26 26
27 constexpr int kPaymentRequestRowHorizontalInsets = 16; 27 constexpr int kPaymentRequestRowHorizontalInsets = 16;
28 constexpr int kPaymentRequestRowVerticalInsets = 8; 28 constexpr int kPaymentRequestRowVerticalInsets = 8;
29 29
30 // Extra inset relative to the header when a right edge should line up with the 30 // Extra inset relative to the header when a right edge should line up with the
31 // close button's X rather than its invisible right edge. 31 // close button's X rather than its invisible right edge.
(...skipping 13 matching lines...) Expand all
45 // Creates and returns a header for all the sheets in the PaymentRequest dialog. 45 // Creates and returns a header for all the sheets in the PaymentRequest dialog.
46 // The header contains an optional back arrow button (if |show_back_arrow| is 46 // The header contains an optional back arrow button (if |show_back_arrow| is
47 // true), a |title| label. |delegate| becomes the delegate for the back and 47 // true), a |title| label. |delegate| becomes the delegate for the back and
48 // close buttons. 48 // close buttons.
49 // +---------------------------+ 49 // +---------------------------+
50 // | <- | Title | 50 // | <- | Title |
51 // +---------------------------+ 51 // +---------------------------+
52 std::unique_ptr<views::View> CreateSheetHeaderView( 52 std::unique_ptr<views::View> CreateSheetHeaderView(
53 bool show_back_arrow, 53 bool show_back_arrow,
54 const base::string16& title, 54 const base::string16& title,
55 views::VectorIconButtonDelegate* delegate); 55 views::ImageButtonDelegate* delegate);
56 56
57 // Returns a card image view for the given |card_type|. Includes a rounded rect 57 // Returns a card image view for the given |card_type|. Includes a rounded rect
58 // border. Callers need to set the size of the resulting ImageView. 58 // border. Callers need to set the size of the resulting ImageView.
59 std::unique_ptr<views::ImageView> CreateCardIconView( 59 std::unique_ptr<views::ImageView> CreateCardIconView(
60 const std::string& card_type); 60 const std::string& card_type);
61 61
62 // Represents formatting options for each of the different contexts in which an 62 // Represents formatting options for each of the different contexts in which an
63 // Address label may be displayed. 63 // Address label may be displayed.
64 enum class AddressStyleType { SUMMARY, DETAILED }; 64 enum class AddressStyleType { SUMMARY, DETAILED };
65 65
(...skipping 18 matching lines...) Expand all
84 // Creates a views::Border object that can paint the gray horizontal ruler used 84 // Creates a views::Border object that can paint the gray horizontal ruler used
85 // as a separator between items in the Payment Request dialog. 85 // as a separator between items in the Payment Request dialog.
86 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); 86 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder();
87 87
88 // Creates a label with a bold font. 88 // Creates a label with a bold font.
89 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); 89 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text);
90 90
91 } // namespace payments 91 } // namespace payments
92 92
93 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 93 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698