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

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

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: fix compile and tests Created 3 years, 7 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/mojom/payment_request.mojom.h" 12 #include "components/payments/mojom/payment_request.mojom.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 #include "ui/gfx/geometry/insets.h"
14 15
15 namespace autofill { 16 namespace autofill {
16 class AutofillProfile; 17 class AutofillProfile;
17 } 18 }
18 19
19 namespace views { 20 namespace views {
20 class Border; 21 class Border;
21 class ButtonListener; 22 class ButtonListener;
22 class ImageView; 23 class ImageView;
23 class Label; 24 class Label;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // email, and phone fields according to the respective boolean fields. 109 // email, and phone fields according to the respective boolean fields.
109 std::unique_ptr<views::View> GetContactInfoLabel( 110 std::unique_ptr<views::View> GetContactInfoLabel(
110 AddressStyleType type, 111 AddressStyleType type,
111 const std::string& locale, 112 const std::string& locale,
112 const autofill::AutofillProfile& profile, 113 const autofill::AutofillProfile& profile,
113 const PaymentOptionsProvider& options, 114 const PaymentOptionsProvider& options,
114 const PaymentsProfileComparator& comp); 115 const PaymentsProfileComparator& comp);
115 116
116 // Creates a views::Border object that can paint the gray horizontal ruler used 117 // Creates a views::Border object that can paint the gray horizontal ruler used
117 // as a separator between items in the Payment Request dialog. 118 // as a separator between items in the Payment Request dialog.
118 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(SkColor color); 119 std::unique_ptr<views::Border> CreatePaymentRequestRowBorder(
120 SkColor color,
121 const gfx::Insets& insets = gfx::Insets());
sky 2017/05/07 22:26:14 Document insets.
Bret 2017/05/09 22:03:09 Done. Also removed the default insets because I no
119 122
120 // Creates a label with a bold font. 123 // Creates a label with a bold font.
121 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text); 124 std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text);
122 125
123 // Creates a 2 line label containing |shipping_option|'s label and amount. If 126 // Creates a 2 line label containing |shipping_option|'s label and amount. If
124 // |emphasize_label| is true, the label part will be in medium weight. 127 // |emphasize_label| is true, the label part will be in medium weight.
125 std::unique_ptr<views::View> CreateShippingOptionLabel( 128 std::unique_ptr<views::View> CreateShippingOptionLabel(
126 payments::mojom::PaymentShippingOption* shipping_option, 129 payments::mojom::PaymentShippingOption* shipping_option,
127 const base::string16& formatted_amount, 130 const base::string16& formatted_amount,
128 bool emphasize_label); 131 bool emphasize_label);
129 132
130 } // namespace payments 133 } // namespace payments
131 134
132 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_ 135 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698