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

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: Fix warning which causes one of the bots to fail Created 3 years, 8 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..33d3ec6096b59d7047249129e30cf056ad5ec85d 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_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, ChromeLayoutDelegate::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));
+ ChromeLayoutDelegate::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, ChromeLayoutDelegate::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,
+ ChromeLayoutDelegate::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