| Index: chrome/browser/chromeos/options/wifi_config_view.cc
|
| diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
|
| index 65edd85bbfa7fde4bd8b53c49eec0bb632237bed..87b683debd599c021f2cf24858a6be8417aba1e1 100644
|
| --- a/chrome/browser/chromeos/options/wifi_config_view.cc
|
| +++ b/chrome/browser/chromeos/options/wifi_config_view.cc
|
| @@ -14,7 +14,6 @@
|
| #include "chrome/browser/chromeos/net/shill_error.h"
|
| #include "chrome/browser/chromeos/options/passphrase_textfield.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| -#include "chrome/browser/ui/views/harmony/layout_delegate.h"
|
| #include "chrome/grit/generated_resources.h"
|
| #include "chrome/grit/theme_resources.h"
|
| #include "chromeos/login/login_state.h"
|
| @@ -40,6 +39,7 @@
|
| #include "ui/views/controls/label.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/layout/grid_layout.h"
|
| +#include "ui/views/layout/layout_delegate.h"
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/window/dialog_client_view.h"
|
|
|
| @@ -936,7 +936,7 @@ void WifiConfigView::Init(bool show_8021x) {
|
| }
|
|
|
| views::GridLayout* layout = views::GridLayout::CreatePanel(this);
|
| - LayoutDelegate* delegate = LayoutDelegate::Get();
|
| + views::LayoutDelegate* delegate = views::LayoutDelegate::Get();
|
|
|
| const int column_view_set_id = 0;
|
| views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id);
|
| @@ -953,15 +953,15 @@ void WifiConfigView::Init(bool show_8021x) {
|
| 1, views::GridLayout::USE_PREF, 0, 0);
|
| }
|
| column_set->AddPaddingColumn(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
|
| + 0, delegate->GetDistanceMetric(
|
| + views::DistanceMetric::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(
|
| + views::DistanceMetric::RELATED_CONTROL_HORIZONTAL));
|
| // Password visible button / policy indicator.
|
| column_set->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 0,
|
| views::GridLayout::FIXED, kPasswordVisibleWidth, 0);
|
| @@ -989,9 +989,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
|
| layout->AddView(label);
|
| }
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
| }
|
|
|
| // Security select
|
| @@ -1012,9 +1012,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| layout->AddView(security_combobox_);
|
| }
|
| layout->AddView(security_combobox_);
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
| }
|
|
|
| // Only enumerate certificates in the data model for 802.1X networks.
|
| @@ -1041,9 +1041,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| layout->AddView(eap_method_combobox_);
|
| }
|
| layout->AddView(new ControlledSettingIndicatorView(eap_method_ui_data_));
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| // Phase 2 authentication
|
| layout->StartRow(0, column_view_set_id);
|
| @@ -1067,9 +1067,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| layout->AddView(phase_2_auth_combobox_);
|
| }
|
| layout->AddView(new ControlledSettingIndicatorView(phase_2_auth_ui_data_));
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| // Server CA certificate
|
| layout->StartRow(0, column_view_set_id);
|
| @@ -1095,9 +1095,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| }
|
| layout->AddView(
|
| new ControlledSettingIndicatorView(server_ca_cert_ui_data_));
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| // Subject Match
|
| layout->StartRow(0, column_view_set_id);
|
| @@ -1115,9 +1115,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| } else {
|
| layout->AddView(subject_match_textfield_);
|
| }
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| // User certificate
|
| layout->StartRow(0, column_view_set_id);
|
| @@ -1139,9 +1139,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| layout->AddView(user_cert_combobox_);
|
| }
|
| layout->AddView(new ControlledSettingIndicatorView(user_cert_ui_data_));
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| // Identity
|
| layout->StartRow(0, column_view_set_id);
|
| @@ -1161,9 +1161,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| 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(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
| }
|
|
|
| // Passphrase input
|
| @@ -1222,9 +1222,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| layout->AddView(passphrase_visible_button_);
|
| }
|
|
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| if (show_8021x) {
|
| // Anonymous identity
|
| @@ -1246,16 +1246,16 @@ void WifiConfigView::Init(bool show_8021x) {
|
| }
|
| layout->AddView(
|
| new ControlledSettingIndicatorView(identity_anonymous_ui_data_));
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
| }
|
|
|
| if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
|
| // We need a little bit more padding above Checkboxes.
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
| }
|
|
|
| // Checkboxes.
|
| @@ -1283,9 +1283,9 @@ void WifiConfigView::Init(bool show_8021x) {
|
| layout->SkipColumns(1);
|
| layout->AddView(share_network_checkbox_);
|
| }
|
| - layout->AddPaddingRow(
|
| - 0, delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + delegate->GetDistanceMetric(
|
| + views::DistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| // Create an error label.
|
| layout->StartRow(0, column_view_set_id);
|
|
|