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

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

Issue 2896263002: [Payments] Changes to validation in the Credit Card editor (Closed)
Patch Set: Initial 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 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_request_views_util.h" 5 #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 title_label->SetFontList( 231 title_label->SetFontList(
232 title_label->GetDefaultFontList().DeriveWithSizeDelta( 232 title_label->GetDefaultFontList().DeriveWithSizeDelta(
233 ui::kTitleFontSizeDelta)); 233 ui::kTitleFontSizeDelta));
234 layout->AddView(title_label); 234 layout->AddView(title_label);
235 235
236 return container; 236 return container;
237 } 237 }
238 238
239 std::unique_ptr<views::ImageView> CreateInstrumentIconView( 239 std::unique_ptr<views::ImageView> CreateInstrumentIconView(
240 int icon_resource_id, 240 int icon_resource_id,
241 const base::string16& tooltip_text) { 241 const base::string16& tooltip_text,
242 float opacity) {
242 std::unique_ptr<views::ImageView> card_icon_view = 243 std::unique_ptr<views::ImageView> card_icon_view =
243 base::MakeUnique<views::ImageView>(); 244 base::MakeUnique<views::ImageView>();
244 card_icon_view->set_can_process_events_within_subtree(false); 245 card_icon_view->set_can_process_events_within_subtree(false);
245 card_icon_view->SetImage(ResourceBundle::GetSharedInstance() 246 card_icon_view->SetImage(ResourceBundle::GetSharedInstance()
246 .GetImageNamed(icon_resource_id) 247 .GetImageNamed(icon_resource_id)
247 .AsImageSkia()); 248 .AsImageSkia());
248 card_icon_view->SetTooltipText(tooltip_text); 249 card_icon_view->SetTooltipText(tooltip_text);
250 card_icon_view->SetPaintToLayer();
251 card_icon_view->layer()->SetOpacity(opacity);
249 return card_icon_view; 252 return card_icon_view;
250 } 253 }
251 254
252 std::unique_ptr<views::View> CreateProductLogoFooterView() { 255 std::unique_ptr<views::View> CreateProductLogoFooterView() {
253 std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>(); 256 std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>();
254 257
255 views::BoxLayout* layout = 258 views::BoxLayout* layout =
256 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); 259 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
257 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); 260 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START);
258 layout->set_cross_axis_alignment( 261 layout->set_cross_axis_alignment(
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 392 amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
390 amount_label->set_id( 393 amount_label->set_id(
391 static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT)); 394 static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT));
392 container->AddChildView(amount_label.release()); 395 container->AddChildView(amount_label.release());
393 } 396 }
394 397
395 return container; 398 return container;
396 } 399 }
397 400
398 } // namespace payments 401 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698