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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 security_combobox_ = new views::Combobox(new SecurityComboboxModel()); | 784 security_combobox_ = new views::Combobox(new SecurityComboboxModel()); |
785 security_combobox_->set_listener(this); | 785 security_combobox_->set_listener(this); |
786 layout->AddView(security_combobox_); | 786 layout->AddView(security_combobox_); |
787 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 787 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
788 } | 788 } |
789 | 789 |
790 // Only enumerate certificates in the data model for 802.1X networks. | 790 // Only enumerate certificates in the data model for 802.1X networks. |
791 if (show_8021x) { | 791 if (show_8021x) { |
792 // Initialize cert_library_ for 802.1X netoworks. | 792 // Initialize cert_library_ for 802.1X netoworks. |
793 cert_library_ = chromeos::CrosLibrary::Get()->GetCertLibrary(); | 793 cert_library_ = chromeos::CrosLibrary::Get()->GetCertLibrary(); |
794 // Setup a callback if certificates are yet to be loaded, | 794 cert_library_->AddObserver(this); |
795 if (!cert_library_->CertificatesLoaded()) | 795 cert_library_->RequestCertificates(); |
796 cert_library_->AddObserver(this); | |
797 | 796 |
798 // EAP method | 797 // EAP method |
799 layout->StartRow(0, column_view_set_id); | 798 layout->StartRow(0, column_view_set_id); |
800 layout->AddView(new views::Label(l10n_util::GetStringUTF16( | 799 layout->AddView(new views::Label(l10n_util::GetStringUTF16( |
801 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_EAP_METHOD))); | 800 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_EAP_METHOD))); |
802 eap_method_combobox_ = new views::Combobox(new EAPMethodComboboxModel()); | 801 eap_method_combobox_ = new views::Combobox(new EAPMethodComboboxModel()); |
803 eap_method_combobox_->set_listener(this); | 802 eap_method_combobox_->set_listener(this); |
804 layout->AddView(eap_method_combobox_); | 803 layout->AddView(eap_method_combobox_); |
805 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 804 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
806 | 805 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 // 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. |
1074 if (ssid_textfield_) | 1073 if (ssid_textfield_) |
1075 ssid_textfield_->RequestFocus(); | 1074 ssid_textfield_->RequestFocus(); |
1076 else if (eap_method_combobox_) | 1075 else if (eap_method_combobox_) |
1077 eap_method_combobox_->RequestFocus(); | 1076 eap_method_combobox_->RequestFocus(); |
1078 else if (passphrase_textfield_ && passphrase_textfield_->IsEnabled()) | 1077 else if (passphrase_textfield_ && passphrase_textfield_->IsEnabled()) |
1079 passphrase_textfield_->RequestFocus(); | 1078 passphrase_textfield_->RequestFocus(); |
1080 } | 1079 } |
1081 | 1080 |
1082 } // namespace chromeos | 1081 } // namespace chromeos |
OLD | NEW |