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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.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: chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc b/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc
index 4dc0d68943f09b23a1316ef2830e21b497dd6406..74aad2fffdde5a9e305476aebcdd3fd4d5fb19f7 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h"
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include "chrome/browser/ui/views/harmony/chrome_views_layout_delegate.h"
#include "chrome/grit/locale_settings.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_palette.h"
@@ -74,8 +74,8 @@ views::View* ToolbarActionsBarBubbleViews::CreateExtraView() {
views::View* parent = new views::View();
parent->SetLayoutManager(new views::BoxLayout(
views::BoxLayout::kHorizontal, 0, 0,
- LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)));
+ ChromeViewsLayoutDelegate::Get()->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL)));
parent->AddChildView(icon.release());
parent->AddChildView(label.release());
return parent;
@@ -106,11 +106,11 @@ bool ToolbarActionsBarBubbleViews::Close() {
}
void ToolbarActionsBarBubbleViews::Init() {
- LayoutDelegate* delegate = LayoutDelegate::Get();
+ ChromeViewsLayoutDelegate* delegate = ChromeViewsLayoutDelegate::Get();
SetLayoutManager(new views::BoxLayout(
views::BoxLayout::kVertical, 0, 0,
- delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)));
+ delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL)));
// Add the content string.
views::Label* content_label =
@@ -128,8 +128,8 @@ void ToolbarActionsBarBubbleViews::Init() {
item_list_ = new views::Label(item_list);
item_list_->SetBorder(views::CreateEmptyBorder(
0,
- delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING),
+ delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_HORIZONTAL),
0, 0));
item_list_->SetMultiLine(true);
item_list_->SizeToFit(width);

Powered by Google App Engine
This is Rietveld 408576698