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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 card_info_container->AddChildView( | 95 card_info_container->AddChildView( |
96 new views::Label(card_->TypeAndLastFourDigits())); | 96 new views::Label(card_->TypeAndLastFourDigits())); |
97 card_info_container->AddChildView(new views::Label( | 97 card_info_container->AddChildView(new views::Label( |
98 card_->GetInfo(autofill::AutofillType(autofill::CREDIT_CARD_NAME_FULL), | 98 card_->GetInfo(autofill::AutofillType(autofill::CREDIT_CARD_NAME_FULL), |
99 g_browser_process->GetApplicationLocale()))); | 99 g_browser_process->GetApplicationLocale()))); |
100 layout->AddView(card_info_container.release()); | 100 layout->AddView(card_info_container.release()); |
101 | 101 |
102 std::unique_ptr<views::ImageView> checkmark = | 102 std::unique_ptr<views::ImageView> checkmark = |
103 base::MakeUnique<views::ImageView>(); | 103 base::MakeUnique<views::ImageView>(); |
104 checkmark->set_interactive(false); | 104 checkmark->set_can_process_events_within_subtree(false); |
105 checkmark->SetImage( | 105 checkmark->SetImage( |
106 gfx::CreateVectorIcon(views::kMenuCheckIcon, 0xFF609265)); | 106 gfx::CreateVectorIcon(views::kMenuCheckIcon, 0xFF609265)); |
107 layout->AddView(checkmark.release()); | 107 layout->AddView(checkmark.release()); |
108 | 108 |
109 std::unique_ptr<views::ImageView> card_icon_view = | 109 std::unique_ptr<views::ImageView> card_icon_view = |
110 CreateCardIconView(card_->type()); | 110 CreateCardIconView(card_->type()); |
111 card_icon_view->SetImageSize(gfx::Size(32, 20)); | 111 card_icon_view->SetImageSize(gfx::Size(32, 20)); |
112 layout->AddView(card_icon_view.release()); | 112 layout->AddView(card_icon_view.release()); |
113 | 113 |
114 return std::move(row); | 114 return std::move(row); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 PaymentMethodViewControllerTags::ADD_CREDIT_CARD_BUTTON): | 173 PaymentMethodViewControllerTags::ADD_CREDIT_CARD_BUTTON): |
174 dialog()->ShowCreditCardEditor(); | 174 dialog()->ShowCreditCardEditor(); |
175 break; | 175 break; |
176 default: | 176 default: |
177 PaymentRequestSheetController::ButtonPressed(sender, event); | 177 PaymentRequestSheetController::ButtonPressed(sender, event); |
178 break; | 178 break; |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 } // namespace payments | 182 } // namespace payments |
OLD | NEW |