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

Unified Diff: ui/views/bubble/bubble_dialog_delegate.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/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index c32f4c318563393afd5926e32ecb73200db9f805..740dd7bb3cc671aad7d8932a7be9ffb881dca37b 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -15,8 +15,8 @@
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/focus/view_storage.h"
#include "ui/views/layout/layout_constants.h"
+#include "ui/views/layout/views_layout_delegate.h"
#include "ui/views/style/platform_style.h"
-#include "ui/views/views_delegate.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
#include "ui/views/window/dialog_client_view.h"
@@ -215,10 +215,10 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view,
accept_events_(true),
adjust_if_offscreen_(true),
parent_window_(NULL) {
- ViewsDelegate* views_delegate = ViewsDelegate::GetInstance();
- margins_ = views_delegate->GetInsetsMetric(InsetsMetric::BUBBLE_DIALOG);
+ ViewsLayoutDelegate* layout_delegate = ViewsLayoutDelegate::Get();
+ margins_ = layout_delegate->GetInsetsMetric(InsetsMetric::BUBBLE_DIALOG);
title_margins_ =
- views_delegate->GetInsetsMetric(InsetsMetric::DIALOG_FRAME_VIEW);
+ layout_delegate->GetInsetsMetric(InsetsMetric::DIALOG_FRAME_VIEW);
if (anchor_view)
SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme());

Powered by Google App Engine
This is Rietveld 408576698