| Index: chrome/browser/ui/views/payments/shipping_list_view_controller.cc
|
| diff --git a/chrome/browser/ui/views/payments/shipping_list_view_controller.cc b/chrome/browser/ui/views/payments/shipping_list_view_controller.cc
|
| index ccf6155e68b8c74d26f7b2ef537d8fedbf5a1e91..5109745f5c829e6538ab3c169bffd395055549bd 100644
|
| --- a/chrome/browser/ui/views/payments/shipping_list_view_controller.cc
|
| +++ b/chrome/browser/ui/views/payments/shipping_list_view_controller.cc
|
| @@ -8,11 +8,13 @@
|
| #include <utility>
|
|
|
| #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
|
| +#include "chrome/browser/ui/views/payments/payment_request_row_view.h"
|
| #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
|
| #include "components/payments/payment_request.h"
|
| #include "components/strings/grit/components_strings.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/views/layout/box_layout.h"
|
| +#include "ui/views/layout/grid_layout.h"
|
|
|
| namespace payments {
|
|
|
| @@ -36,8 +38,8 @@ std::unique_ptr<views::View> ShippingListViewController::CreateView() {
|
| for (auto* profile : request()->shipping_profiles()) {
|
| // TODO(tmartino): Pass an actual locale in place of empty string.
|
| content_view->AddChildView(
|
| - GetShippingAddressLabel(AddressStyleType::DETAILED, std::string(),
|
| - *profile)
|
| + CreateAddressRow(GetShippingAddressLabel(AddressStyleType::DETAILED,
|
| + std::string(), *profile))
|
| .release());
|
| }
|
|
|
| @@ -49,4 +51,28 @@ std::unique_ptr<views::View> ShippingListViewController::CreateView() {
|
| std::move(content_view));
|
| }
|
|
|
| +std::unique_ptr<views::Button> ShippingListViewController::CreateAddressRow(
|
| + std::unique_ptr<views::View> content) {
|
| + std::unique_ptr<PaymentRequestRowView> row =
|
| + base::MakeUnique<PaymentRequestRowView>(this);
|
| + views::GridLayout* layout = new views::GridLayout(row.get());
|
| + row->SetLayoutManager(layout);
|
| +
|
| + layout->SetInsets(
|
| + kPaymentRequestRowVerticalInsets, kPaymentRequestRowHorizontalInsets,
|
| + kPaymentRequestRowVerticalInsets,
|
| + kPaymentRequestRowHorizontalInsets + kPaymentRequestRowExtraRightInset);
|
| +
|
| + // Add a column listing the address.
|
| + views::ColumnSet* columns = layout->AddColumnSet(0);
|
| + columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
|
| + views::GridLayout::USE_PREF, 0, 0);
|
| +
|
| + layout->StartRow(0, 0);
|
| + content->set_can_process_events_within_subtree(false);
|
| + layout->AddView(content.release());
|
| +
|
| + return std::move(row);
|
| +}
|
| +
|
| } // namespace payments
|
|
|