| 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/profile_list_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/profile_list_view_controller.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" | 8 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" |
| 9 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" | 9 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" |
| 10 #include "chrome/browser/ui/views/payments/payment_request_row_view.h" | 10 #include "chrome/browser/ui/views/payments/payment_request_row_view.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 ProfileListViewController::CreateExtraFooterView() { | 384 ProfileListViewController::CreateExtraFooterView() { |
| 385 std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); | 385 std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); |
| 386 | 386 |
| 387 extra_view->SetLayoutManager(new views::BoxLayout( | 387 extra_view->SetLayoutManager(new views::BoxLayout( |
| 388 views::BoxLayout::kHorizontal, 0, 0, kPaymentRequestButtonSpacing)); | 388 views::BoxLayout::kHorizontal, 0, 0, kPaymentRequestButtonSpacing)); |
| 389 | 389 |
| 390 views::LabelButton* button = views::MdTextButton::CreateSecondaryUiButton( | 390 views::LabelButton* button = views::MdTextButton::CreateSecondaryUiButton( |
| 391 this, l10n_util::GetStringUTF16(GetSecondaryButtonTextId())); | 391 this, l10n_util::GetStringUTF16(GetSecondaryButtonTextId())); |
| 392 button->set_tag(GetSecondaryButtonTag()); | 392 button->set_tag(GetSecondaryButtonTag()); |
| 393 button->set_id(GetSecondaryButtonViewId()); | 393 button->set_id(GetSecondaryButtonViewId()); |
| 394 button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS); |
| 394 extra_view->AddChildView(button); | 395 extra_view->AddChildView(button); |
| 395 | 396 |
| 396 return extra_view; | 397 return extra_view; |
| 397 } | 398 } |
| 398 | 399 |
| 399 void ProfileListViewController::ButtonPressed(views::Button* sender, | 400 void ProfileListViewController::ButtonPressed(views::Button* sender, |
| 400 const ui::Event& event) { | 401 const ui::Event& event) { |
| 401 if (sender->tag() == GetSecondaryButtonTag()) | 402 if (sender->tag() == GetSecondaryButtonTag()) |
| 402 ShowEditor(nullptr); | 403 ShowEditor(nullptr); |
| 403 else | 404 else |
| 404 PaymentRequestSheetController::ButtonPressed(sender, event); | 405 PaymentRequestSheetController::ButtonPressed(sender, event); |
| 405 } | 406 } |
| 406 | 407 |
| 407 } // namespace payments | 408 } // namespace payments |
| OLD | NEW |