OLD | NEW |
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 #include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 // | 1800MYPOTUS | | 410 // | 1800MYPOTUS | |
411 // +----------------------------------------------+ | 411 // +----------------------------------------------+ |
412 std::unique_ptr<views::Button> PaymentSheetViewController::CreateShippingRow() { | 412 std::unique_ptr<views::Button> PaymentSheetViewController::CreateShippingRow() { |
413 std::unique_ptr<views::Button> section = CreatePaymentSheetRow( | 413 std::unique_ptr<views::Button> section = CreatePaymentSheetRow( |
414 this, GetShippingAddressSectionString(spec()->shipping_type()), | 414 this, GetShippingAddressSectionString(spec()->shipping_type()), |
415 CreateShippingSectionContent(), std::unique_ptr<views::View>(nullptr), | 415 CreateShippingSectionContent(), std::unique_ptr<views::View>(nullptr), |
416 widest_name_column_view_width_); | 416 widest_name_column_view_width_); |
417 section->set_tag( | 417 section->set_tag( |
418 static_cast<int>(PaymentSheetViewControllerTags::SHOW_SHIPPING_BUTTON)); | 418 static_cast<int>(PaymentSheetViewControllerTags::SHOW_SHIPPING_BUTTON)); |
419 section->set_id( | 419 section->set_id( |
420 static_cast<int>(DialogViewID::PAYMENT_SHEET_SHIPPING_SECTION)); | 420 static_cast<int>(DialogViewID::PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION)); |
421 return section; | 421 return section; |
422 } | 422 } |
423 | 423 |
424 // Creates the Payment Method row, which contains a "Payment" label, the user's | 424 // Creates the Payment Method row, which contains a "Payment" label, the user's |
425 // masked Credit Card details, the icon for the selected card, and a chevron. | 425 // masked Credit Card details, the icon for the selected card, and a chevron. |
426 // +----------------------------------------------+ | 426 // +----------------------------------------------+ |
427 // | Payment Visa ****0000 | | 427 // | Payment Visa ****0000 | |
428 // | John Smith | VISA | > | | 428 // | John Smith | VISA | > | |
429 // | | | 429 // | | |
430 // +----------------------------------------------+ | 430 // +----------------------------------------------+ |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 std::move(option_label), std::unique_ptr<views::View>(nullptr), | 513 std::move(option_label), std::unique_ptr<views::View>(nullptr), |
514 widest_name_column_view_width_); | 514 widest_name_column_view_width_); |
515 section->set_tag(static_cast<int>( | 515 section->set_tag(static_cast<int>( |
516 PaymentSheetViewControllerTags::SHOW_SHIPPING_OPTION_BUTTON)); | 516 PaymentSheetViewControllerTags::SHOW_SHIPPING_OPTION_BUTTON)); |
517 section->set_id( | 517 section->set_id( |
518 static_cast<int>(DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION)); | 518 static_cast<int>(DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION)); |
519 return section; | 519 return section; |
520 } | 520 } |
521 | 521 |
522 } // namespace payments | 522 } // namespace payments |
OLD | NEW |