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

Unified Diff: chrome/browser/chromeos/options/wimax_config_view.cc

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Fix Bookmark and Global error unittests 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/chromeos/options/wimax_config_view.cc
diff --git a/chrome/browser/chromeos/options/wimax_config_view.cc b/chrome/browser/chromeos/options/wimax_config_view.cc
index b82802fccf53f4a2661841f4972e4d52351246ab..3f0eb02e90c4d9a2cac39c0f54c24d1e8ea4160f 100644
--- a/chrome/browser/chromeos/options/wimax_config_view.cc
+++ b/chrome/browser/chromeos/options/wimax_config_view.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/net/shill_error.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include "chrome/browser/ui/views/harmony/chrome_views_layout_delegate.h"
#include "chrome/browser/ui/views/layout_utils.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
@@ -211,7 +211,7 @@ void WimaxConfigView::Init() {
&passphrase_ui_data_, wimax, ::onc::wifi::kPassphrase);
views::GridLayout* layout = layout_utils::CreatePanelLayout(this);
- LayoutDelegate* delegate = LayoutDelegate::Get();
+ ChromeViewsLayoutDelegate* delegate = ChromeViewsLayoutDelegate::Get();
const int column_view_set_id = 0;
views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id);
@@ -220,15 +220,15 @@ void WimaxConfigView::Init() {
column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1,
views::GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(
- 0, delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
+ 0, delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_HORIZONTAL));
// Textfield, combobox.
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
views::GridLayout::USE_PREF, 0,
ChildNetworkConfigView::kInputFieldMinWidth);
column_set->AddPaddingColumn(
- 0, delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
+ 0, delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_HORIZONTAL));
// Password visible button / policy indicator.
column_set->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1,
views::GridLayout::USE_PREF, 0, kPasswordVisibleWidth);
@@ -240,9 +240,8 @@ void WimaxConfigView::Init() {
views::Label* label = new views::Label(base::UTF8ToUTF16(wimax->name()));
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
layout->AddView(label);
- layout->AddPaddingRow(
- 0, delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
+ layout->AddPaddingRow(0, delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL));
// Identity
layout->StartRow(0, column_view_set_id);
@@ -256,9 +255,8 @@ void WimaxConfigView::Init() {
identity_textfield_->SetEnabled(identity_ui_data_.IsEditable());
layout->AddView(identity_textfield_);
layout->AddView(new ControlledSettingIndicatorView(identity_ui_data_));
- layout->AddPaddingRow(
- 0, delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
+ layout->AddPaddingRow(0, delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL));
// Passphrase input
layout->StartRow(0, column_view_set_id);
@@ -308,9 +306,8 @@ void WimaxConfigView::Init() {
layout->AddView(passphrase_visible_button_);
}
- layout->AddPaddingRow(
- 0, delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
+ layout->AddPaddingRow(0, delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL));
// Checkboxes.
@@ -347,9 +344,8 @@ void WimaxConfigView::Init() {
layout->SkipColumns(1);
layout->AddView(share_network_checkbox_);
}
- layout->AddPaddingRow(
- 0, delegate->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
+ layout->AddPaddingRow(0, delegate->GetDistanceMetric(
+ ChromeDistanceMetric::RELATED_CONTROL_VERTICAL));
// Create an error label.
layout->StartRow(0, column_view_set_id);

Powered by Google App Engine
This is Rietveld 408576698