| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // TODO(anthonyvd): populate this view. | 30 // TODO(anthonyvd): populate this view. |
| 31 | 31 |
| 32 return CreatePaymentView(CreateSheetHeaderView( | 32 return CreatePaymentView(CreateSheetHeaderView( |
| 33 true, | 33 true, |
| 34 l10n_util::GetStringUTF16( | 34 l10n_util::GetStringUTF16( |
| 35 IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME), | 35 IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME), |
| 36 this), | 36 this), |
| 37 std::move(content_view)); | 37 std::move(content_view)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void PaymentMethodViewController::ButtonPressed( | |
| 41 views::Button* sender, const ui::Event& event) { | |
| 42 switch (sender->tag()) { | |
| 43 case static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG): | |
| 44 dialog()->CloseDialog(); | |
| 45 break; | |
| 46 case static_cast<int>(PaymentRequestCommonTags::BACK_BUTTON_TAG): | |
| 47 dialog()->GoBack(); | |
| 48 break; | |
| 49 default: | |
| 50 NOTREACHED(); | |
| 51 } | |
| 52 } | |
| 53 | |
| 54 } // namespace payments | 40 } // namespace payments |
| OLD | NEW |