| 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/shipping_list_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/shipping_list_view_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" | 10 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 return CreatePaymentView( | 44 return CreatePaymentView( |
| 45 CreateSheetHeaderView( | 45 CreateSheetHeaderView( |
| 46 /* show_back_arrow = */ true, | 46 /* show_back_arrow = */ true, |
| 47 l10n_util::GetStringUTF16(IDS_PAYMENT_REQUEST_SHIPPING_SECTION_NAME), | 47 l10n_util::GetStringUTF16(IDS_PAYMENT_REQUEST_SHIPPING_SECTION_NAME), |
| 48 this), | 48 this), |
| 49 std::move(content_view)); | 49 std::move(content_view)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ShippingListViewController::ButtonPressed(views::Button* sender, | |
| 53 const ui::Event& event) { | |
| 54 switch (sender->tag()) { | |
| 55 case static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG): | |
| 56 dialog()->CloseDialog(); | |
| 57 break; | |
| 58 case static_cast<int>(PaymentRequestCommonTags::BACK_BUTTON_TAG): | |
| 59 dialog()->GoBack(); | |
| 60 break; | |
| 61 default: | |
| 62 NOTREACHED(); | |
| 63 } | |
| 64 } | |
| 65 | |
| 66 } // namespace payments | 52 } // namespace payments |
| OLD | NEW |