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

Unified Diff: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Deleted LayoutDelegate and HarmonyLayoutDelegate. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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 99b46c85d11ce2a48cf702e29058a48ecc52b20b..7c5efebed803be7502ffc4fa3075dcedf0630777 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_views_layout_delegate.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"
@@ -36,14 +36,14 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView(
constexpr int kLabelColumnSet = 1;
views::ColumnSet* column_set = layout->AddColumnSet(kLabelColumnSet);
column_set->AddPaddingColumn(
- 0, LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN) +
+ 0, ChromeViewsLayoutDelegate::Get()->GetDistanceMetric(
+ ChromeDistanceMetric::DIALOG_BUTTON_MARGIN) +
desktop_ios_promotion::GetPromoImage(
GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_TextfieldDefaultColor))
.width() +
- LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
+ ChromeViewsLayoutDelegate::Get()->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_HORIZONTAL));
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0,
views::GridLayout::FIXED, bubble_width, 0);
@@ -53,8 +53,8 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView(
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));
+ 0, ChromeViewsLayoutDelegate::Get()->GetDistanceMetric(
+ ChromeDistanceMetric::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);
@@ -62,9 +62,9 @@ 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,
+ ChromeViewsLayoutDelegate::Get()->GetDistanceMetric(
+ ChromeDistanceMetric::UNRELATED_CONTROL_VERTICAL));
layout->StartRow(0, kDoubleButtonColumnSet);
layout->AddView(send_sms_button_);
layout->AddView(no_button_);

Powered by Google App Engine
This is Rietveld 408576698