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

Side by Side Diff: chrome/browser/ui/views/payments/profile_list_view_controller.cc

Issue 2741343004: [Web Payments] Use shipping type in the header of the Shipping Address sheet. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698