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

Unified Diff: chrome/browser/ui/views/layout_utils.cc

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Fix Bookmark and Global error unittests 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/layout_utils.cc
diff --git a/chrome/browser/ui/views/layout_utils.cc b/chrome/browser/ui/views/layout_utils.cc
index 27b2c0885c95cc9b42d2ff7190b74e344fd44962..fded9b89eec7b33339c922d29809fe1c7758d9fb 100644
--- a/chrome/browser/ui/views/layout_utils.cc
+++ b/chrome/browser/ui/views/layout_utils.cc
@@ -4,17 +4,15 @@
#include "chrome/browser/ui/views/layout_utils.h"
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include "chrome/browser/ui/views/harmony/chrome_views_layout_delegate.h"
#include "ui/views/view.h"
namespace layout_utils {
views::GridLayout* CreatePanelLayout(views::View* host) {
views::GridLayout* layout = new views::GridLayout(host);
- LayoutDelegate* delegate = LayoutDelegate::Get();
- layout->SetInsets(gfx::Insets(
- delegate->GetMetric(LayoutDelegate::Metric::PANEL_CONTENT_MARGIN),
- delegate->GetMetric(LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN)));
+ layout->SetInsets(ChromeViewsLayoutDelegate::Get()->GetInsetsMetric(
+ ChromeInsetsMetric::PANEL_LAYOUT));
host->SetLayoutManager(layout);
return layout;
}

Powered by Google App Engine
This is Rietveld 408576698