| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_sheet_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ | 331 // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ |
| 332 std::unique_ptr<views::Button> CreateWithButton( | 332 std::unique_ptr<views::Button> CreateWithButton( |
| 333 std::unique_ptr<views::View> content_view, | 333 std::unique_ptr<views::View> content_view, |
| 334 const base::string16& button_string, | 334 const base::string16& button_string, |
| 335 bool button_enabled) { | 335 bool button_enabled) { |
| 336 std::unique_ptr<views::Button> button( | 336 std::unique_ptr<views::Button> button( |
| 337 views::MdTextButton::CreateSecondaryUiBlueButton(listener_, | 337 views::MdTextButton::CreateSecondaryUiBlueButton(listener_, |
| 338 button_string)); | 338 button_string)); |
| 339 button->set_tag(tag_); | 339 button->set_tag(tag_); |
| 340 button->set_id(id_); | 340 button->set_id(id_); |
| 341 button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS); |
| 341 button->SetEnabled(button_enabled); | 342 button->SetEnabled(button_enabled); |
| 342 return CreatePaymentSheetRow(listener_, section_name_, | 343 return CreatePaymentSheetRow(listener_, section_name_, |
| 343 std::move(content_view), nullptr, | 344 std::move(content_view), nullptr, |
| 344 std::move(button), /*clickable=*/false, | 345 std::move(button), /*clickable=*/false, |
| 345 /*extra_trailing_inset=*/false); | 346 /*extra_trailing_inset=*/false); |
| 346 } | 347 } |
| 347 | 348 |
| 348 views::ButtonListener* listener_; | 349 views::ButtonListener* listener_; |
| 349 base::string16 section_name_; | 350 base::string16 section_name_; |
| 350 int tag_; | 351 int tag_; |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 data_source_label->SetDefaultStyle(default_style); | 920 data_source_label->SetDefaultStyle(default_style); |
| 920 data_source_label->AddStyleRange( | 921 data_source_label->AddStyleRange( |
| 921 gfx::Range(link_begin, link_begin + link_length), | 922 gfx::Range(link_begin, link_begin + link_length), |
| 922 views::StyledLabel::RangeStyleInfo::CreateForLink()); | 923 views::StyledLabel::RangeStyleInfo::CreateForLink()); |
| 923 data_source_label->SizeToFit(0); | 924 data_source_label->SizeToFit(0); |
| 924 content_view->AddChildView(data_source_label.release()); | 925 content_view->AddChildView(data_source_label.release()); |
| 925 return content_view; | 926 return content_view; |
| 926 } | 927 } |
| 927 | 928 |
| 928 } // namespace payments | 929 } // namespace payments |
| OLD | NEW |