| 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_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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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   std::unique_ptr<views::ImageView> card_icon_view = | 242   std::unique_ptr<views::ImageView> card_icon_view = | 
| 243       base::MakeUnique<views::ImageView>(); | 243       base::MakeUnique<views::ImageView>(); | 
| 244   card_icon_view->set_can_process_events_within_subtree(false); | 244   card_icon_view->set_can_process_events_within_subtree(false); | 
| 245   card_icon_view->SetImage(ResourceBundle::GetSharedInstance() | 245   card_icon_view->SetImage(ResourceBundle::GetSharedInstance() | 
| 246                                .GetImageNamed(icon_resource_id) | 246                                .GetImageNamed(icon_resource_id) | 
| 247                                .AsImageSkia()); | 247                                .AsImageSkia()); | 
| 248   card_icon_view->SetTooltipText(tooltip_text); | 248   card_icon_view->SetTooltipText(tooltip_text); | 
| 249   card_icon_view->SetBorder(views::CreateRoundedRectBorder( |  | 
| 250       1, 3, card_icon_view->GetNativeTheme()->GetSystemColor( |  | 
| 251                 ui::NativeTheme::kColorId_UnfocusedBorderColor))); |  | 
| 252   return card_icon_view; | 249   return card_icon_view; | 
| 253 } | 250 } | 
| 254 | 251 | 
| 255 std::unique_ptr<views::View> CreateProductLogoFooterView() { | 252 std::unique_ptr<views::View> CreateProductLogoFooterView() { | 
| 256   std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>(); | 253   std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>(); | 
| 257 | 254 | 
| 258   views::BoxLayout* layout = | 255   views::BoxLayout* layout = | 
| 259       new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); | 256       new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); | 
| 260   layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); | 257   layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); | 
| 261   layout->set_cross_axis_alignment( | 258   layout->set_cross_axis_alignment( | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 392     amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 389     amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 
| 393     amount_label->set_id( | 390     amount_label->set_id( | 
| 394         static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT)); | 391         static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT)); | 
| 395     container->AddChildView(amount_label.release()); | 392     container->AddChildView(amount_label.release()); | 
| 396   } | 393   } | 
| 397 | 394 | 
| 398   return container; | 395   return container; | 
| 399 } | 396 } | 
| 400 | 397 | 
| 401 }  // namespace payments | 398 }  // namespace payments | 
| OLD | NEW | 
|---|