OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/cros/cros_library.h" | 9 #include "chrome/browser/chromeos/cros/cros_library.h" |
10 #include "chrome/browser/chromeos/cros/network_library.h" | 10 #include "chrome/browser/chromeos/cros/network_library.h" |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 layout->SkipColumns(1); | 941 layout->SkipColumns(1); |
942 layout->AddView(share_network_checkbox_); | 942 layout->AddView(share_network_checkbox_); |
943 } | 943 } |
944 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 944 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
945 | 945 |
946 // Create an error label. | 946 // Create an error label. |
947 layout->StartRow(0, column_view_set_id); | 947 layout->StartRow(0, column_view_set_id); |
948 layout->SkipColumns(1); | 948 layout->SkipColumns(1); |
949 error_label_ = new views::Label(); | 949 error_label_ = new views::Label(); |
950 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 950 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
951 error_label_->SetColor(SK_ColorRED); | 951 error_label_->SetEnabledColor(SK_ColorRED); |
952 layout->AddView(error_label_); | 952 layout->AddView(error_label_); |
953 | 953 |
954 // Initialize the field and checkbox values. | 954 // Initialize the field and checkbox values. |
955 | 955 |
956 // After creating the fields, we set the values. Fields need to be created | 956 // After creating the fields, we set the values. Fields need to be created |
957 // first because RefreshEapFields() will enable/disable them as appropriate. | 957 // first because RefreshEapFields() will enable/disable them as appropriate. |
958 if (show_8021x) { | 958 if (show_8021x) { |
959 EAPMethod eap_method = (wifi ? wifi->eap_method() : EAP_METHOD_UNKNOWN); | 959 EAPMethod eap_method = (wifi ? wifi->eap_method() : EAP_METHOD_UNKNOWN); |
960 switch (eap_method) { | 960 switch (eap_method) { |
961 case EAP_METHOD_PEAP: | 961 case EAP_METHOD_PEAP: |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 // Set focus to a reasonable widget, depending on what we're showing. | 1072 // Set focus to a reasonable widget, depending on what we're showing. |
1073 if (ssid_textfield_) | 1073 if (ssid_textfield_) |
1074 ssid_textfield_->RequestFocus(); | 1074 ssid_textfield_->RequestFocus(); |
1075 else if (eap_method_combobox_) | 1075 else if (eap_method_combobox_) |
1076 eap_method_combobox_->RequestFocus(); | 1076 eap_method_combobox_->RequestFocus(); |
1077 else if (passphrase_textfield_ && passphrase_textfield_->IsEnabled()) | 1077 else if (passphrase_textfield_ && passphrase_textfield_->IsEnabled()) |
1078 passphrase_textfield_->RequestFocus(); | 1078 passphrase_textfield_->RequestFocus(); |
1079 } | 1079 } |
1080 | 1080 |
1081 } // namespace chromeos | 1081 } // namespace chromeos |
OLD | NEW |