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