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

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

Issue 2656853002: [Web Payments] Refactor the row display code. (Closed)
Patch Set: Rebase 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 VectorIconButtonDelegate; 19 class VectorIconButtonDelegate;
19 class View; 20 class View;
20 } 21 }
21 22
22 namespace payments { 23 namespace payments {
23 24
25 constexpr int kPaymentRequestRowHorizontalInsets = 14;
26 constexpr int kPaymentRequestRowVerticalInsets = 8;
27
24 enum class PaymentRequestCommonTags { 28 enum class PaymentRequestCommonTags {
25 BACK_BUTTON_TAG = 0, 29 BACK_BUTTON_TAG = 0,
26 CLOSE_BUTTON_TAG, 30 CLOSE_BUTTON_TAG,
27 // This is the max value of tags for controls common to multiple 31 // This is the max value of tags for controls common to multiple
28 // PaymentRequest contexts. Individual screens that handle both common and 32 // PaymentRequest contexts. Individual screens that handle both common and
29 // specific events with tags can start their specific tags at this value. 33 // specific events with tags can start their specific tags at this value.
30 PAYMENT_REQUEST_COMMON_TAG_MAX 34 PAYMENT_REQUEST_COMMON_TAG_MAX
31 }; 35 };
32 36
33 // Creates and returns a header for all the sheets in the PaymentRequest dialog. 37 // Creates and returns a header for all the sheets in the PaymentRequest dialog.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // the contact info in the context specified by |type|. Includes/excludes name, 78 // the contact info in the context specified by |type|. Includes/excludes name,
75 // email, and phone fields according to the respective boolean fields. 79 // email, and phone fields according to the respective boolean fields.
76 std::unique_ptr<views::View> GetContactInfoLabel( 80 std::unique_ptr<views::View> GetContactInfoLabel(
77 AddressStyleType type, 81 AddressStyleType type,
78 const std::string& locale, 82 const std::string& locale,
79 const autofill::AutofillProfile& profile, 83 const autofill::AutofillProfile& profile,
80 bool show_payer_name, 84 bool show_payer_name,
81 bool show_payer_email, 85 bool show_payer_email,
82 bool show_payer_phone); 86 bool show_payer_phone);
83 87
88 // Creates a views::Border object that can paint the gray horizontal ruler used
89 // as a separator between items in the Payment Request dialog.
90 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder();
91
84 } // namespace payments 92 } // namespace payments
85 93
86 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 94 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698