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/editor_view_controller.h" | 5 #include "chrome/browser/ui/views/payments/editor_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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 true, l10n_util::GetStringUTF16( | 74 true, l10n_util::GetStringUTF16( |
75 IDS_PAYMENT_REQUEST_CREDIT_CARD_EDITOR_ADD_TITLE), | 75 IDS_PAYMENT_REQUEST_CREDIT_CARD_EDITOR_ADD_TITLE), |
76 this), | 76 this), |
77 std::move(content_view)); | 77 std::move(content_view)); |
78 } | 78 } |
79 | 79 |
80 // Adds the "required fields" label in disabled text, to obtain this result. | 80 // Adds the "required fields" label in disabled text, to obtain this result. |
81 // +---------------------------------------------------------+ | 81 // +---------------------------------------------------------+ |
82 // | "* indicates required fields" | CANCEL | DONE | | 82 // | "* indicates required fields" | CANCEL | DONE | |
83 // +---------------------------------------------------------+ | 83 // +---------------------------------------------------------+ |
84 std::unique_ptr<views::View> EditorViewController::CreateLeadingFooterView() { | 84 std::unique_ptr<views::View> EditorViewController::CreateExtraFooterView() { |
85 std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>(); | 85 std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>(); |
86 | 86 |
87 views::BoxLayout* layout = | 87 views::BoxLayout* layout = |
88 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); | 88 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); |
89 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); | 89 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); |
90 layout->set_cross_axis_alignment( | 90 layout->set_cross_axis_alignment( |
91 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); | 91 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); |
92 content_view->SetLayoutManager(layout); | 92 content_view->SetLayoutManager(layout); |
93 | 93 |
94 // Adds the "* indicates a required field" label in "disabled" grey text. | 94 // Adds the "* indicates a required field" label in "disabled" grey text. |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 error_label->SetFontList( | 235 error_label->SetFontList( |
236 error_label->GetDefaultFontList().DeriveWithSizeDelta(-1)); | 236 error_label->GetDefaultFontList().DeriveWithSizeDelta(-1)); |
237 error_label->SetEnabledColor(error_label->GetNativeTheme()->GetSystemColor( | 237 error_label->SetEnabledColor(error_label->GetNativeTheme()->GetSystemColor( |
238 ui::NativeTheme::kColorId_AlertSeverityHigh)); | 238 ui::NativeTheme::kColorId_AlertSeverityHigh)); |
239 error_labels_[field] = error_label.get(); | 239 error_labels_[field] = error_label.get(); |
240 | 240 |
241 layout->AddView(error_label.release()); | 241 layout->AddView(error_label.release()); |
242 } | 242 } |
243 | 243 |
244 } // namespace payments | 244 } // namespace payments |
OLD | NEW |