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

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc

Issue 2753243002: Views/Harmony: Replace layout constants in chrome/browser/ui/views/extensions. (Closed)
Patch Set: Review comments. 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 4f0c3180abadd86415af39aa918bfae66b1a284c..74d2a599cd232ad928cbd18b8953b95a6db5e84a 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
@@ -15,6 +15,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/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"
@@ -35,7 +36,6 @@
#include "ui/views/controls/link.h"
#include "ui/views/controls/link_listener.h"
#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/layout_constants.h"
using extensions::Extension;
@@ -207,14 +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.
- std::unique_ptr<views::BoxLayout> layout(
- new views::BoxLayout(views::BoxLayout::kVertical, 0, 0,
- views::kRelatedControlVerticalSpacing));
+ LayoutDelegate* layout_delegate = LayoutDelegate::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->set_minimum_cross_axis_size(kRightColumnWidth);
// Indent by the size of the icon.
layout->set_inside_border_insets(gfx::Insets(
- 0, GetIconSize().width() + views::kUnrelatedControlHorizontalSpacing, 0,
- 0));
+ 0,
+ GetIconSize().width() +
+ layout_delegate->GetMetric(
+ LayoutDelegate::Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING),
+ 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