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

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

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Final feedback addressed 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/extensions/bookmark_app_confirmation_view.cc
diff --git a/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc b/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
index bbe258d463593b0d5f07bfd21d58400223236df5..4b670432a20084575b5b124a4d40448e9101730b 100644
--- a/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
+++ b/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
@@ -8,7 +8,7 @@
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/strings/grit/components_strings.h"
@@ -74,14 +74,13 @@ BookmarkAppConfirmationView::BookmarkAppConfirmationView(
callback_(callback),
open_as_window_checkbox_(nullptr),
title_tf_(nullptr) {
- LayoutDelegate* layout_delegate = LayoutDelegate::Get();
+ ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
// Align the contents with the dialog buttons.
views::BoxLayout* layout = new views::BoxLayout(
views::BoxLayout::kHorizontal,
- layout_delegate->GetMetric(LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN),
- layout_delegate->GetMetric(LayoutDelegate::Metric::PANEL_CONTENT_MARGIN),
- layout_delegate->GetMetric(
- LayoutDelegate::Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE));
+ provider->GetDistanceMetric(DISTANCE_DIALOG_BUTTON_MARGIN),
+ provider->GetDistanceMetric(DISTANCE_PANEL_CONTENT_MARGIN),
+ provider->GetDistanceMetric(DISTANCE_UNRELATED_CONTROL_HORIZONTAL_LARGE));
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
SetLayoutManager(layout);
« no previous file with comments | « chrome/browser/ui/views/device_chooser_content_view.cc ('k') | chrome/browser/ui/views/extensions/chooser_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698