Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: chrome/browser/ui/views/payments/profile_list_view_controller.cc

Issue 2926443002: [WebPayments] Making all fields and buttons focusable (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 ProfileListViewController::CreateExtraFooterView() { 381 ProfileListViewController::CreateExtraFooterView() {
382 std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>(); 382 std::unique_ptr<views::View> extra_view = base::MakeUnique<views::View>();
383 383
384 extra_view->SetLayoutManager(new views::BoxLayout( 384 extra_view->SetLayoutManager(new views::BoxLayout(
385 views::BoxLayout::kHorizontal, 0, 0, kPaymentRequestButtonSpacing)); 385 views::BoxLayout::kHorizontal, 0, 0, kPaymentRequestButtonSpacing));
386 386
387 views::LabelButton* button = views::MdTextButton::CreateSecondaryUiButton( 387 views::LabelButton* button = views::MdTextButton::CreateSecondaryUiButton(
388 this, l10n_util::GetStringUTF16(GetSecondaryButtonTextId())); 388 this, l10n_util::GetStringUTF16(GetSecondaryButtonTextId()));
389 button->set_tag(GetSecondaryButtonTag()); 389 button->set_tag(GetSecondaryButtonTag());
390 button->set_id(GetSecondaryButtonViewId()); 390 button->set_id(GetSecondaryButtonViewId());
391 button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
391 extra_view->AddChildView(button); 392 extra_view->AddChildView(button);
392 393
393 return extra_view; 394 return extra_view;
394 } 395 }
395 396
396 void ProfileListViewController::ButtonPressed(views::Button* sender, 397 void ProfileListViewController::ButtonPressed(views::Button* sender,
397 const ui::Event& event) { 398 const ui::Event& event) {
398 if (sender->tag() == GetSecondaryButtonTag()) 399 if (sender->tag() == GetSecondaryButtonTag())
399 ShowEditor(nullptr); 400 ShowEditor(nullptr);
400 else 401 else
401 PaymentRequestSheetController::ButtonPressed(sender, event); 402 PaymentRequestSheetController::ButtonPressed(sender, event);
402 } 403 }
403 404
404 } // namespace payments 405 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698