| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" | 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 13 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 14 #include "chrome/browser/chromeos/net/shill_error.h" | 14 #include "chrome/browser/chromeos/net/shill_error.h" |
| 15 #include "chrome/browser/chromeos/options/passphrase_textfield.h" | 15 #include "chrome/browser/chromeos/options/passphrase_textfield.h" |
| 16 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
| 17 #include "chrome/browser/ui/views/harmony/layout_delegate.h" | 17 #include "chrome/browser/ui/views/harmony/layout_delegate.h" |
| 18 #include "chrome/browser/ui/views/layout_utils.h" | |
| 19 #include "chrome/grit/generated_resources.h" | 18 #include "chrome/grit/generated_resources.h" |
| 20 #include "chrome/grit/theme_resources.h" | 19 #include "chrome/grit/theme_resources.h" |
| 21 #include "chromeos/login/login_state.h" | 20 #include "chromeos/login/login_state.h" |
| 22 #include "chromeos/network/client_cert_util.h" | 21 #include "chromeos/network/client_cert_util.h" |
| 23 #include "chromeos/network/network_configuration_handler.h" | 22 #include "chromeos/network/network_configuration_handler.h" |
| 24 #include "chromeos/network/network_connect.h" | 23 #include "chromeos/network/network_connect.h" |
| 25 #include "chromeos/network/network_event_log.h" | 24 #include "chromeos/network/network_event_log.h" |
| 26 #include "chromeos/network/network_handler.h" | 25 #include "chromeos/network/network_handler.h" |
| 27 #include "chromeos/network/network_state.h" | 26 #include "chromeos/network/network_state.h" |
| 28 #include "chromeos/network/network_state_handler.h" | 27 #include "chromeos/network/network_state_handler.h" |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 ParseEAPUIProperty( | 928 ParseEAPUIProperty( |
| 930 &identity_anonymous_ui_data_, network, ::onc::eap::kAnonymousIdentity); | 929 &identity_anonymous_ui_data_, network, ::onc::eap::kAnonymousIdentity); |
| 931 ParseEAPUIProperty( | 930 ParseEAPUIProperty( |
| 932 &save_credentials_ui_data_, network, ::onc::eap::kSaveCredentials); | 931 &save_credentials_ui_data_, network, ::onc::eap::kSaveCredentials); |
| 933 if (show_8021x) | 932 if (show_8021x) |
| 934 ParseEAPUIProperty(&passphrase_ui_data_, network, ::onc::eap::kPassword); | 933 ParseEAPUIProperty(&passphrase_ui_data_, network, ::onc::eap::kPassword); |
| 935 else | 934 else |
| 936 ParseUIProperty(&passphrase_ui_data_, network, ::onc::wifi::kPassphrase); | 935 ParseUIProperty(&passphrase_ui_data_, network, ::onc::wifi::kPassphrase); |
| 937 } | 936 } |
| 938 | 937 |
| 939 views::GridLayout* layout = layout_utils::CreatePanelLayout(this); | 938 views::GridLayout* layout = views::GridLayout::CreatePanel(this); |
| 940 LayoutDelegate* delegate = LayoutDelegate::Get(); | 939 LayoutDelegate* delegate = LayoutDelegate::Get(); |
| 941 | 940 |
| 942 const int column_view_set_id = 0; | 941 const int column_view_set_id = 0; |
| 943 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); | 942 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); |
| 944 const int kPasswordVisibleWidth = 20; | 943 const int kPasswordVisibleWidth = 20; |
| 945 // Label | 944 // Label |
| 946 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { | 945 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
| 947 // This constant ensures the minimum width of the label column and ensures | 946 // This constant ensures the minimum width of the label column and ensures |
| 948 // the width of the Wifi dialog equals 512. | 947 // the width of the Wifi dialog equals 512. |
| 949 const int kLabelMinWidth = 158; | 948 const int kLabelMinWidth = 158; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 1487 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
| 1489 const NetworkState* network, | 1488 const NetworkState* network, |
| 1490 const std::string& key) { | 1489 const std::string& key) { |
| 1491 std::string onc_tag = network->type() == shill::kTypeEthernet | 1490 std::string onc_tag = network->type() == shill::kTypeEthernet |
| 1492 ? ::onc::ethernet::kEAP | 1491 ? ::onc::ethernet::kEAP |
| 1493 : ::onc::wifi::kEAP; | 1492 : ::onc::wifi::kEAP; |
| 1494 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); | 1493 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); |
| 1495 } | 1494 } |
| 1496 | 1495 |
| 1497 } // namespace chromeos | 1496 } // namespace chromeos |
| OLD | NEW |