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

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_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/extensions/extension_installed_bubble_view.cc
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
index 28739288ac975e71f80f5e596a55d0c3ecb1363c..dbe97257ba35b211bccc6c401de24f23145b63bb 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h"
#include "chrome/browser/ui/views/frame/browser_view.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/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "chrome/browser/ui/views/sync/bubble_sync_promo_view.h"
@@ -207,19 +207,19 @@ void ExtensionInstalledBubbleView::Init() {
// or a link to configure the keybinding shortcut (if one exists).
// Extra info can include a promo for signing into sync.
- LayoutDelegate* layout_delegate = LayoutDelegate::Get();
+ ChromeViewsLayoutDelegate* layout_delegate = ChromeViewsLayoutDelegate::Get();
std::unique_ptr<views::BoxLayout> layout(new views::BoxLayout(
views::BoxLayout::kVertical, 0, 0,
- layout_delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)));
+ layout_delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL)));
layout->set_minimum_cross_axis_size(kRightColumnWidth);
// Indent by the size of the icon.
- layout->set_inside_border_insets(gfx::Insets(
- 0,
- GetIconSize().width() +
- layout_delegate->GetMetric(
- LayoutDelegate::Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING),
- 0, 0));
+ layout->set_inside_border_insets(
+ gfx::Insets(0,
+ GetIconSize().width() +
+ layout_delegate->GetDistanceMetric(
+ ChromeDistanceMetric::UNRELATED_CONTROL_HORIZONTAL),
+ 0, 0));
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_START);
SetLayoutManager(layout.release());

Powered by Google App Engine
This is Rietveld 408576698