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

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

Issue 2625183002: [WebPayments] Adding Shipping Address and Contact Info display to order summary (Closed)
Patch Set: sky comments Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_views_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 12
13 namespace autofill {
14 class AutofillProfile;
15 }
16
12 namespace views { 17 namespace views {
13 class VectorIconButtonDelegate; 18 class VectorIconButtonDelegate;
14 class View; 19 class View;
15 } 20 }
16 21
17 namespace payments { 22 namespace payments {
18 23
19 enum class PaymentRequestCommonTags { 24 enum class PaymentRequestCommonTags {
20 BACK_BUTTON_TAG = 0, 25 BACK_BUTTON_TAG = 0,
21 CLOSE_BUTTON_TAG, 26 CLOSE_BUTTON_TAG,
(...skipping 25 matching lines...) Expand all
47 // +---------------------------+ 52 // +---------------------------+
48 // | CONTENT | 53 // | CONTENT |
49 // | VIEW | 54 // | VIEW |
50 // +---------------------------+ 55 // +---------------------------+
51 // | | CANCEL | PAY | 56 // | | CANCEL | PAY |
52 // +---------------------------+ 57 // +---------------------------+
53 std::unique_ptr<views::View> CreatePaymentView( 58 std::unique_ptr<views::View> CreatePaymentView(
54 std::unique_ptr<views::View> header_view, 59 std::unique_ptr<views::View> header_view,
55 std::unique_ptr<views::View> content_view); 60 std::unique_ptr<views::View> content_view);
56 61
62 // Represents formatting options for each of the different contexts in which an
63 // Address label may be displayed.
64 enum class AddressStyleType { SUMMARY, DETAILED };
65
66 // Extracts and formats descriptive text from the given |profile| to represent
67 // the address in the context specified by |type|.
68 std::unique_ptr<views::View> GetShippingAddressLabel(
69 AddressStyleType type,
70 const std::string& locale,
71 const autofill::AutofillProfile& profile);
72
73 // Extracts and formats descriptive text from the given |profile| to represent
74 // the contact info in the context specified by |type|. Includes/excludes name,
75 // email, and phone fields according to the respective boolean fields.
76 std::unique_ptr<views::View> GetContactInfoLabel(
77 AddressStyleType type,
78 const std::string& locale,
79 const autofill::AutofillProfile& profile,
80 bool show_payer_name,
81 bool show_payer_email,
82 bool show_payer_phone);
83
57 } // namespace payments 84 } // namespace payments
58 85
59 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 86 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_views_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698