OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "chrome/browser/ui/views/payments/payment_method_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/payment_method_view_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 std::unique_ptr<views::View> PaymentMethodViewController::CreateView() { | 141 std::unique_ptr<views::View> PaymentMethodViewController::CreateView() { |
142 return CreatePaymentView( | 142 return CreatePaymentView( |
143 CreateSheetHeaderView( | 143 CreateSheetHeaderView( |
144 true, l10n_util::GetStringUTF16( | 144 true, l10n_util::GetStringUTF16( |
145 IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME), | 145 IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME), |
146 this), | 146 this), |
147 payment_method_list_.CreateListView()); | 147 payment_method_list_.CreateListView()); |
148 } | 148 } |
149 | 149 |
150 std::unique_ptr<views::View> PaymentMethodViewController::CreateExtraView() { | 150 std::unique_ptr<views::View> |
| 151 PaymentMethodViewController::CreateExtraFooterView() { |
151 std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); | 152 std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); |
152 | 153 |
153 extra_view->SetLayoutManager(new views::BoxLayout( | 154 extra_view->SetLayoutManager(new views::BoxLayout( |
154 views::BoxLayout::kHorizontal, kPaymentRequestRowHorizontalInsets, | 155 views::BoxLayout::kHorizontal, kPaymentRequestRowHorizontalInsets, |
155 kPaymentRequestRowVerticalInsets, kPaymentRequestButtonSpacing)); | 156 kPaymentRequestRowVerticalInsets, kPaymentRequestButtonSpacing)); |
156 | 157 |
157 views::LabelButton* button = views::MdTextButton::CreateSecondaryUiButton( | 158 views::LabelButton* button = views::MdTextButton::CreateSecondaryUiButton( |
158 this, l10n_util::GetStringUTF16(IDS_AUTOFILL_ADD_CREDITCARD_CAPTION)); | 159 this, l10n_util::GetStringUTF16(IDS_AUTOFILL_ADD_CREDITCARD_CAPTION)); |
159 button->set_tag(static_cast<int>( | 160 button->set_tag(static_cast<int>( |
160 PaymentMethodViewControllerTags::ADD_CREDIT_CARD_BUTTON)); | 161 PaymentMethodViewControllerTags::ADD_CREDIT_CARD_BUTTON)); |
(...skipping 11 matching lines...) Expand all Loading... |
172 PaymentMethodViewControllerTags::ADD_CREDIT_CARD_BUTTON): | 173 PaymentMethodViewControllerTags::ADD_CREDIT_CARD_BUTTON): |
173 dialog()->ShowCreditCardEditor(); | 174 dialog()->ShowCreditCardEditor(); |
174 break; | 175 break; |
175 default: | 176 default: |
176 PaymentRequestSheetController::ButtonPressed(sender, event); | 177 PaymentRequestSheetController::ButtonPressed(sender, event); |
177 break; | 178 break; |
178 } | 179 } |
179 } | 180 } |
180 | 181 |
181 } // namespace payments | 182 } // namespace payments |
OLD | NEW |