Chromium Code Reviews| Index: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
| diff --git a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
| index 47e050d0da5e8092c5ccfadd0c9818fd998035f0..2502ad983238cfe78054ae16b1cab91ae83e7de9 100644 |
| --- a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
| +++ b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
| @@ -7,7 +7,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h" |
| -#include "chrome/browser/ui/views/harmony/layout_delegate.h" |
| +#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" |
| #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| #include "chrome/grit/generated_resources.h" |
| #include "ui/base/l10n/l10n_util.h" |
| @@ -30,8 +30,8 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView( |
| layout->set_minimum_size(gfx::Size(bubble_width, 0)); |
| layout->SetInsets( |
| 0, |
| - LayoutDelegate::Get()->GetMetric( |
| - LayoutDelegate::Metric::PANEL_CONTENT_MARGIN) + |
| + ChromeLayoutProvider::Get()->GetDistanceMetric( |
| + DISTANCE_PANEL_CONTENT_MARGIN) + |
| desktop_ios_promotion::GetPromoImage( |
| GetNativeTheme()->GetSystemColor( |
| ui::NativeTheme::kColorId_TextfieldDefaultColor)) |
| @@ -44,15 +44,25 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView( |
| this, l10n_util::GetStringUTF16(IDS_DESKTOP_TO_IOS_PROMO_NO_THANKS)); |
| constexpr int kLabelColumnSet = 1; |
| views::ColumnSet* column_set = layout->AddColumnSet(kLabelColumnSet); |
| + column_set->AddPaddingColumn( |
|
Peter Kasting
2017/04/12 21:37:43
I think this is a bad merge -- this code got delet
kylix_rd
2017/04/13 16:45:42
Done.
|
| + 0, ChromeLayoutProvider::Get()->GetDistanceMetric( |
| + DISTANCE_DIALOG_BUTTON_MARGIN) + |
| + desktop_ios_promotion::GetPromoImage( |
| + GetNativeTheme()->GetSystemColor( |
| + ui::NativeTheme::kColorId_TextfieldDefaultColor)) |
| + .width() + |
| + ChromeLayoutProvider::Get()->GetDistanceMetric( |
| + views::DISTANCE_RELATED_CONTROL_HORIZONTAL)); |
| + |
| column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0, |
| views::GridLayout::FIXED, bubble_width, 0); |
| constexpr int kDoubleButtonColumnSet = 2; |
| column_set = layout->AddColumnSet(kDoubleButtonColumnSet); |
| column_set->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, |
| 1, views::GridLayout::USE_PREF, 0, 0); |
| - column_set->AddPaddingColumn( |
| - 0, LayoutDelegate::Get()->GetMetric( |
| - LayoutDelegate::Metric::RELATED_BUTTON_HORIZONTAL_SPACING)); |
| + column_set->AddPaddingColumn(0, |
| + ChromeLayoutProvider::Get()->GetDistanceMetric( |
| + views::DISTANCE_RELATED_BUTTON_HORIZONTAL)); |
| column_set->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, |
| 0, views::GridLayout::USE_PREF, 0, 0); |
| promotion_text_label_->SetEnabledColor(SK_ColorGRAY); |
| @@ -60,9 +70,8 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView( |
| promotion_text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| layout->StartRow(0, kLabelColumnSet); |
| layout->AddView(promotion_text_label_); |
| - layout->AddPaddingRow( |
| - 0, LayoutDelegate::Get()->GetMetric( |
| - LayoutDelegate::Metric::UNRELATED_CONTROL_VERTICAL_SPACING)); |
| + layout->AddPaddingRow(0, ChromeLayoutProvider::Get()->GetDistanceMetric( |
| + DISTANCE_UNRELATED_CONTROL_VERTICAL)); |
| layout->StartRow(0, kDoubleButtonColumnSet); |
| layout->AddView(send_sms_button_); |
| layout->AddView(no_button_); |