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

Unified Diff: ui/views/examples/dialog_example.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: ui/views/examples/dialog_example.cc
diff --git a/ui/views/examples/dialog_example.cc b/ui/views/examples/dialog_example.cc
index 56be1b86283acfd5b3a880fbecb92fb5510a5932..40b879bb8b6cdf44419d077ecc5536f04b67120c 100644
--- a/ui/views/examples/dialog_example.cc
+++ b/ui/views/examples/dialog_example.cc
@@ -16,7 +16,7 @@
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_constants.h"
-#include "ui/views/views_delegate.h"
+#include "ui/views/layout/views_layout_delegate.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
@@ -132,7 +132,7 @@ void DialogExample::CreateExampleView(View* container) {
const float kStretchy = 1.f;
const int horizontal_spacing =
- ViewsDelegate::GetInstance()->GetDistanceMetric(
+ views::ViewsLayoutDelegate::Get()->GetDistanceMetric(
views::DistanceMetric::RELATED_BUTTON_HORIZONTAL);
GridLayout* layout = GridLayout::CreatePanel(container);
container->SetLayoutManager(layout);
@@ -188,7 +188,7 @@ void DialogExample::StartRowWithLabel(GridLayout* layout, const char* label) {
const float kFixedVerticalResize = 0.f;
layout->StartRowWithPadding(
kFixedVerticalResize, kFieldsColumnId, kFixedVerticalResize,
- ViewsDelegate::GetInstance()->GetDistanceMetric(
+ views::ViewsLayoutDelegate::Get()->GetDistanceMetric(
views::DistanceMetric::RELATED_CONTROL_VERTICAL));
layout->AddView(new Label(base::ASCIIToUTF16(label)));
}

Powered by Google App Engine
This is Rietveld 408576698