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

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

Issue 2692923011: [Payments] Adjust the UI fit the mocks better (Closed)
Patch Set: adds ascii art Created 3 years, 10 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 VectorIconButtonDelegate; 20 class VectorIconButtonDelegate;
21 class View; 21 class View;
22 } 22 }
23 23
24 namespace payments { 24 namespace payments {
25 25
26 constexpr int kPaymentRequestRowHorizontalInsets = 14; 26 constexpr int kPaymentRequestRowHorizontalInsets = 16;
27 constexpr int kPaymentRequestRowVerticalInsets = 8; 27 constexpr int kPaymentRequestRowVerticalInsets = 8;
28 // Extra inset relative to the header when a right edge should line up with the 28 // Extra inset relative to the header when a right edge should line up with the
29 // close button's X rather than its invisible right edge. 29 // close button's X rather than its invisible right edge.
30 constexpr int kPaymentRequestRowExtraRightInset = 8; 30 constexpr int kPaymentRequestRowExtraRightInset = 8;
31 31
32 enum class PaymentRequestCommonTags { 32 enum class PaymentRequestCommonTags {
33 BACK_BUTTON_TAG = 0, 33 BACK_BUTTON_TAG = 0,
34 CLOSE_BUTTON_TAG, 34 CLOSE_BUTTON_TAG,
35 // This is the max value of tags for controls common to multiple 35 // This is the max value of tags for controls common to multiple
36 // PaymentRequest contexts. Individual screens that handle both common and 36 // PaymentRequest contexts. Individual screens that handle both common and
37 // specific events with tags can start their specific tags at this value. 37 // specific events with tags can start their specific tags at this value.
38 PAYMENT_REQUEST_COMMON_TAG_MAX 38 PAYMENT_REQUEST_COMMON_TAG_MAX
39 }; 39 };
40 40
41 // Creates and returns a header for all the sheets in the PaymentRequest dialog. 41 // Creates and returns a header for all the sheets in the PaymentRequest dialog.
42 // The header contains an optional back arrow button (if |show_back_arrow| is 42 // The header contains an optional back arrow button (if |show_back_arrow| is
43 // true), a |title| label, and a right-aligned X close button. |delegate| 43 // true), a |title| label. |delegate| becomes the delegate for the back and
44 // becomes the delegate for the back and close buttons. 44 // close buttons.
45 // +---------------------------+ 45 // +---------------------------+
46 // | <- | Title | X | 46 // | <- | Title |
47 // +---------------------------+ 47 // +---------------------------+
48 std::unique_ptr<views::View> CreateSheetHeaderView( 48 std::unique_ptr<views::View> CreateSheetHeaderView(
49 bool show_back_arrow, 49 bool show_back_arrow,
50 const base::string16& title, 50 const base::string16& title,
51 views::VectorIconButtonDelegate* delegate); 51 views::VectorIconButtonDelegate* delegate);
52 52
53 // Returns a card image view for the given |card_type|. Includes a rounded rect 53 // Returns a card image view for the given |card_type|. Includes a rounded rect
54 // border. Callers need to set the size of the resulting ImageView. 54 // border. Callers need to set the size of the resulting ImageView.
55 std::unique_ptr<views::ImageView> CreateCardIconView( 55 std::unique_ptr<views::ImageView> CreateCardIconView(
56 const std::string& card_type); 56 const std::string& card_type);
(...skipping 20 matching lines...) Expand all
77 bool show_payer_email, 77 bool show_payer_email,
78 bool show_payer_phone); 78 bool show_payer_phone);
79 79
80 // Creates a views::Border object that can paint the gray horizontal ruler used 80 // Creates a views::Border object that can paint the gray horizontal ruler used
81 // as a separator between items in the Payment Request dialog. 81 // as a separator between items in the Payment Request dialog.
82 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); 82 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder();
83 83
84 } // namespace payments 84 } // namespace payments
85 85
86 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 86 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698