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

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

Issue 2774233005: Creating PaymentOptionsProvider interface (Closed)
Patch Set: default case for compile Created 3 years, 8 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 #include "components/payments/core/payment_options_provider.h"
please use gerrit instead 2017/03/29 21:45:16 It should be possible to forward-declare PaymentOp
tmartino 2017/03/30 03:14:22 Done
13 14
14 namespace autofill { 15 namespace autofill {
15 class AutofillProfile; 16 class AutofillProfile;
16 } 17 }
17 18
18 namespace views { 19 namespace views {
19 class Border; 20 class Border;
20 class ButtonListener; 21 class ButtonListener;
21 class ImageView; 22 class ImageView;
22 class Label; 23 class Label;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const std::string& locale, 74 const std::string& locale,
74 const autofill::AutofillProfile& profile); 75 const autofill::AutofillProfile& profile);
75 76
76 // Extracts and formats descriptive text from the given |profile| to represent 77 // Extracts and formats descriptive text from the given |profile| to represent
77 // 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,
78 // email, and phone fields according to the respective boolean fields. 79 // email, and phone fields according to the respective boolean fields.
79 std::unique_ptr<views::View> GetContactInfoLabel( 80 std::unique_ptr<views::View> GetContactInfoLabel(
80 AddressStyleType type, 81 AddressStyleType type,
81 const std::string& locale, 82 const std::string& locale,
82 const autofill::AutofillProfile& profile, 83 const autofill::AutofillProfile& profile,
83 bool show_payer_name, 84 PaymentOptionsProvider* options);
please use gerrit instead 2017/03/29 21:45:16 const-ref because you don't plan to modify the |op
tmartino 2017/03/30 03:14:22 Done.
84 bool show_payer_phone,
85 bool show_payer_email);
86 85
87 // Creates a views::Border object that can paint the gray horizontal ruler used 86 // Creates a views::Border object that can paint the gray horizontal ruler used
88 // as a separator between items in the Payment Request dialog. 87 // as a separator between items in the Payment Request dialog.
89 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(); 88 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder();
90 89
91 // Creates a label with a bold font. 90 // Creates a label with a bold font.
92 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); 91 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text);
93 92
94 base::string16 GetShippingAddressSectionString( 93 base::string16 GetShippingAddressSectionString(
95 payments::mojom::PaymentShippingType shipping_type); 94 PaymentShippingType shipping_type);
96 base::string16 GetShippingOptionSectionString( 95 base::string16 GetShippingOptionSectionString(
97 payments::mojom::PaymentShippingType shipping_type); 96 PaymentShippingType shipping_type);
98 97
99 std::unique_ptr<views::View> CreateShippingOptionLabel( 98 std::unique_ptr<views::View> CreateShippingOptionLabel(
100 payments::mojom::PaymentShippingOption* shipping_option, 99 payments::mojom::PaymentShippingOption* shipping_option,
101 const base::string16& formatted_amount); 100 const base::string16& formatted_amount);
102 101
103 } // namespace payments 102 } // namespace payments
104 103
105 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 104 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698