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

Unified Diff: ui/views/bubble/bubble_dialog_delegate.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
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4820775490ba3c751cd5109d9ccafc0d55e63a4c..3278b6f82c420a685e0a6407f5ea2306650faca5 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/layout_provider.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,9 +215,9 @@ 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_CONTENTS);
- title_margins_ = views_delegate->GetInsetsMetric(InsetsMetric::DIALOG_TITLE);
+ LayoutProvider* provider = LayoutProvider::Get();
+ margins_ = provider->GetInsetsMetric(INSETS_BUBBLE_CONTENTS);
+ title_margins_ = provider->GetInsetsMetric(INSETS_DIALOG_TITLE);
if (anchor_view)
SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme());
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698