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

Unified Diff: chrome/browser/ui/views/collected_cookies_views.cc

Issue 2891013002: Views/Harmony Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Fix build error Created 3 years, 7 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 | « no previous file | chrome/browser/ui/views/create_application_shortcut_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/collected_cookies_views.cc
diff --git a/chrome/browser/ui/views/collected_cookies_views.cc b/chrome/browser/ui/views/collected_cookies_views.cc
index 4b79b3f3d2247709637ead60c609d6b5e469c9ab..3f35f4c7d86aca29e994b06cebf7c7cc8c09a661 100644
--- a/chrome/browser/ui/views/collected_cookies_views.cc
+++ b/chrome/browser/ui/views/collected_cookies_views.cc
@@ -47,7 +47,6 @@
#include "ui/views/controls/tree/tree_view.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/grid_layout.h"
-#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
namespace {
@@ -149,7 +148,8 @@ class InfobarView : public views::View {
new views::BoxLayout(views::BoxLayout::kHorizontal,
kInfobarHorizontalPadding,
kInfobarVerticalPadding,
- views::kRelatedControlSmallHorizontalSpacing));
+ ChromeLayoutProvider::Get()->GetDistanceMetric(
+ DISTANCE_RELATED_CONTROL_HORIZONTAL_SMALL)));
content_->AddChildView(info_image_);
content_->AddChildView(label_);
UpdateVisibility(false, CONTENT_SETTING_BLOCK, base::string16());
@@ -165,14 +165,17 @@ class InfobarView : public views::View {
// Add space around the banner.
gfx::Size size(content_->GetPreferredSize());
- size.Enlarge(0, 2 * views::kRelatedControlVerticalSpacing);
+ size.Enlarge(0, 2 * ChromeLayoutProvider::Get()->GetDistanceMetric(
+ views::DISTANCE_RELATED_CONTROL_VERTICAL));
return size;
}
void Layout() override {
+ ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
+ const int vertical_spacing =
+ provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL);
content_->SetBounds(
- 0, views::kRelatedControlVerticalSpacing,
- width(), height() - views::kRelatedControlVerticalSpacing);
+ 0, vertical_spacing, width(), height() - vertical_spacing);
}
void ViewHierarchyChanged(
« no previous file with comments | « no previous file | chrome/browser/ui/views/create_application_shortcut_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698