| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 pay_button_ = button.get(); | 408 pay_button_ = button.get(); |
| 409 UpdatePayButtonState(state()->is_ready_to_pay()); | 409 UpdatePayButtonState(state()->is_ready_to_pay()); |
| 410 return button; | 410 return button; |
| 411 } | 411 } |
| 412 | 412 |
| 413 bool PaymentSheetViewController::ShouldShowHeaderBackArrow() { | 413 bool PaymentSheetViewController::ShouldShowHeaderBackArrow() { |
| 414 return false; | 414 return false; |
| 415 } | 415 } |
| 416 | 416 |
| 417 base::string16 PaymentSheetViewController::GetSheetTitle() { | 417 base::string16 PaymentSheetViewController::GetSheetTitle() { |
| 418 return l10n_util::GetStringUTF16(IDS_PAYMENT_REQUEST_PAYMENT_SHEET_TITLE); | 418 return l10n_util::GetStringUTF16(IDS_PAYMENTS_TITLE); |
| 419 } | 419 } |
| 420 | 420 |
| 421 void PaymentSheetViewController::FillContentView(views::View* content_view) { | 421 void PaymentSheetViewController::FillContentView(views::View* content_view) { |
| 422 views::GridLayout* layout = new views::GridLayout(content_view); | 422 views::GridLayout* layout = new views::GridLayout(content_view); |
| 423 content_view->SetLayoutManager(layout); | 423 content_view->SetLayoutManager(layout); |
| 424 views::ColumnSet* columns = layout->AddColumnSet(0); | 424 views::ColumnSet* columns = layout->AddColumnSet(0); |
| 425 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER, 1, | 425 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER, 1, |
| 426 views::GridLayout::USE_PREF, 0, 0); | 426 views::GridLayout::USE_PREF, 0, 0); |
| 427 | 427 |
| 428 // The shipping address and contact info rows are optional. | 428 // The shipping address and contact info rows are optional. |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 PaymentSheetViewControllerTags::SHOW_SHIPPING_OPTION_BUTTON), | 889 PaymentSheetViewControllerTags::SHOW_SHIPPING_OPTION_BUTTON), |
| 890 static_cast<int>( | 890 static_cast<int>( |
| 891 DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION_BUTTON), | 891 DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION_BUTTON), |
| 892 widest_name_column_view_width_); | 892 widest_name_column_view_width_); |
| 893 } | 893 } |
| 894 | 894 |
| 895 return section; | 895 return section; |
| 896 } | 896 } |
| 897 | 897 |
| 898 } // namespace payments | 898 } // namespace payments |
| OLD | NEW |