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

Unified Diff: ui/views/bubble/bubble_frame_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
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.cc ('k') | ui/views/controls/button/image_button_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_frame_view.cc
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index 7ba6184978fd9c1610e9d93b43daf94618ea74f4..bf3df7ee47ab05d9f2fc423c4719da48145abf33 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -31,8 +31,8 @@
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/layout_constants.h"
+#include "ui/views/layout/layout_provider.h"
#include "ui/views/resources/grit/views_resources.h"
-#include "ui/views/views_delegate.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/client_view.h"
@@ -312,8 +312,8 @@ void BubbleFrameView::Layout() {
return;
// The close button is positioned somewhat closer to the edge of the bubble.
- const int close_margin = ViewsDelegate::GetInstance()->GetDistanceMetric(
- DistanceMetric::CLOSE_BUTTON_MARGIN);
+ const int close_margin =
+ LayoutProvider::Get()->GetDistanceMetric(DISTANCE_CLOSE_BUTTON_MARGIN);
close_->SetPosition(
gfx::Point(contents_bounds.right() - close_margin - close_->width(),
contents_bounds.y() + close_margin));
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.cc ('k') | ui/views/controls/button/image_button_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698