| 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/profile_list_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/profile_list_view_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/views/payments/payment_request_row_view.h" | 7 #include "chrome/browser/ui/views/payments/payment_request_row_view.h" |
| 8 #include "chrome/browser/ui/views/payments/payment_request_views_util.h" | 8 #include "chrome/browser/ui/views/payments/payment_request_views_util.h" |
| 9 #include "components/payments/content/payment_request.h" | 9 #include "components/payments/content/payment_request.h" |
| 10 #include "components/strings/grit/components_strings.h" | 10 #include "components/strings/grit/components_strings.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 autofill::AutofillProfile* profile) override { | 95 autofill::AutofillProfile* profile) override { |
| 96 return GetShippingAddressLabel(AddressStyleType::DETAILED, | 96 return GetShippingAddressLabel(AddressStyleType::DETAILED, |
| 97 request_->locale(), *profile); | 97 request_->locale(), *profile); |
| 98 } | 98 } |
| 99 | 99 |
| 100 std::vector<autofill::AutofillProfile*> GetProfiles() override { | 100 std::vector<autofill::AutofillProfile*> GetProfiles() override { |
| 101 return request_->shipping_profiles(); | 101 return request_->shipping_profiles(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 base::string16 GetHeaderString() override { | 104 base::string16 GetHeaderString() override { |
| 105 return l10n_util::GetStringUTF16(IDS_PAYMENT_REQUEST_SHIPPING_SECTION_NAME); | 105 return GetShippingAddressSectionString(request_->options()->shipping_type); |
| 106 } | 106 } |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 DISALLOW_COPY_AND_ASSIGN(ShippingProfileViewController); | 109 DISALLOW_COPY_AND_ASSIGN(ShippingProfileViewController); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 class ContactProfileViewController : public ProfileListViewController { | 112 class ContactProfileViewController : public ProfileListViewController { |
| 113 public: | 113 public: |
| 114 ContactProfileViewController(PaymentRequest* request, | 114 ContactProfileViewController(PaymentRequest* request, |
| 115 PaymentRequestDialogView* dialog) | 115 PaymentRequestDialogView* dialog) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 profile, request(), &list_, this, profile == selected_profile)); | 175 profile, request(), &list_, this, profile == selected_profile)); |
| 176 } | 176 } |
| 177 | 177 |
| 178 return CreatePaymentView( | 178 return CreatePaymentView( |
| 179 CreateSheetHeaderView( | 179 CreateSheetHeaderView( |
| 180 /* show_back_arrow = */ true, GetHeaderString(), this), | 180 /* show_back_arrow = */ true, GetHeaderString(), this), |
| 181 list_.CreateListView()); | 181 list_.CreateListView()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace payments | 184 } // namespace payments |
| OLD | NEW |