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

Unified Diff: chrome/browser/ui/views/cookie_info_view.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/cookie_info_view.cc
diff --git a/chrome/browser/ui/views/cookie_info_view.cc b/chrome/browser/ui/views/cookie_info_view.cc
index cd736fe2e6bd8e69ef00a434f5d8ca9537238dd0..449e3cf3e656c76fb7e3bc75d31188068a8413dd 100644
--- a/chrome/browser/ui/views/cookie_info_view.cc
+++ b/chrome/browser/ui/views/cookie_info_view.cc
@@ -12,7 +12,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browsing_data/cookies_tree_model.h"
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include "chrome/browser/ui/views/harmony/chrome_views_layout_delegate.h"
#include "chrome/grit/generated_resources.h"
#include "net/cookies/canonical_cookie.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -147,23 +147,19 @@ void CookieInfoView::Init() {
expires_value_field_ = new views::Textfield;
views::GridLayout* layout = new views::GridLayout(this);
- layout->SetInsets(0,
- LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN),
- 0,
- LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN));
+ ChromeViewsLayoutDelegate* layout_delegate = ChromeViewsLayoutDelegate::Get();
+ layout->SetInsets(
+ layout_delegate->GetInsetsMetric(ChromeInsetsMetric::DIALOG_BUTTON));
Peter Kasting 2017/04/04 02:08:52 This is a behavior change (bottom inset will becom
kylix_rd 2017/04/04 20:28:23 I changed this for a reason... I just cannot remem
SetLayoutManager(layout);
int three_column_layout_id = 0;
views::ColumnSet* column_set = layout->AddColumnSet(three_column_layout_id);
- column_set->AddColumn(LayoutDelegate::Get()->GetControlLabelGridAlignment(),
+ column_set->AddColumn(layout_delegate->GetControlLabelGridAlignment(),
views::GridLayout::CENTER, 0,
views::GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(
- 0,
- LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
+ 0, layout_delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_HORIZONTAL));
column_set->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER,
0, views::GridLayout::USE_PREF, 0, 0);
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,

Powered by Google App Engine
This is Rietveld 408576698