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

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

Issue 2899653002: Remove uses of FontList::Derive*(..) in views payments dialogs. (Closed)
Patch Set: hate you gcc Created 3 years, 7 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/payment_method_view_controller.h" 5 #include "chrome/browser/ui/views/payments/payment_method_view_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/ui/views/harmony/chrome_typography.h"
16 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" 17 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
17 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" 18 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
18 #include "chrome/browser/ui/views/payments/payment_request_row_view.h" 19 #include "chrome/browser/ui/views/payments/payment_request_row_view.h"
19 #include "chrome/browser/ui/views/payments/payment_request_views_util.h" 20 #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
20 #include "chrome/grit/generated_resources.h" 21 #include "chrome/grit/generated_resources.h"
21 #include "components/payments/content/payment_request_state.h" 22 #include "components/payments/content/payment_request_state.h"
22 #include "components/payments/core/autofill_payment_instrument.h" 23 #include "components/payments/core/autofill_payment_instrument.h"
23 #include "components/payments/core/payment_instrument.h" 24 #include "components/payments/core/payment_instrument.h"
24 #include "components/strings/grit/components_strings.h" 25 #include "components/strings/grit/components_strings.h"
25 #include "third_party/skia/include/core/SkColor.h" 26 #include "third_party/skia/include/core/SkColor.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 card_info_container->SetLayoutManager(box_layout.release()); 110 card_info_container->SetLayoutManager(box_layout.release());
110 111
111 if (!instrument_->label().empty()) 112 if (!instrument_->label().empty())
112 card_info_container->AddChildView(new views::Label(instrument_->label())); 113 card_info_container->AddChildView(new views::Label(instrument_->label()));
113 if (!instrument_->sublabel().empty()) { 114 if (!instrument_->sublabel().empty()) {
114 card_info_container->AddChildView( 115 card_info_container->AddChildView(
115 new views::Label(instrument_->sublabel())); 116 new views::Label(instrument_->sublabel()));
116 } 117 }
117 if (!instrument_->IsCompleteForPayment()) { 118 if (!instrument_->IsCompleteForPayment()) {
118 std::unique_ptr<views::Label> missing_info_label = 119 std::unique_ptr<views::Label> missing_info_label =
119 base::MakeUnique<views::Label>(instrument_->GetMissingInfoLabel()); 120 base::MakeUnique<views::Label>(instrument_->GetMissingInfoLabel(),
120 missing_info_label->SetFontList( 121 CONTEXT_DEPRECATED_SMALL);
121 missing_info_label->GetDefaultFontList().DeriveWithSizeDelta(-1));
122 missing_info_label->SetEnabledColor( 122 missing_info_label->SetEnabledColor(
123 missing_info_label->GetNativeTheme()->GetSystemColor( 123 missing_info_label->GetNativeTheme()->GetSystemColor(
124 ui::NativeTheme::kColorId_LinkEnabled)); 124 ui::NativeTheme::kColorId_LinkEnabled));
125 card_info_container->AddChildView(missing_info_label.release()); 125 card_info_container->AddChildView(missing_info_label.release());
126 } 126 }
127 127
128 return card_info_container; 128 return card_info_container;
129 } 129 }
130 130
131 void SelectedStateChanged() override { 131 void SelectedStateChanged() override {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 base::Unretained(state()), /*selected=*/true), 224 base::Unretained(state()), /*selected=*/true),
225 /*credit_card=*/nullptr); 225 /*credit_card=*/nullptr);
226 break; 226 break;
227 default: 227 default:
228 PaymentRequestSheetController::ButtonPressed(sender, event); 228 PaymentRequestSheetController::ButtonPressed(sender, event);
229 break; 229 break;
230 } 230 }
231 } 231 }
232 232
233 } // namespace payments 233 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698