| 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 cert_library_->AddObserver(this); | 794 // Setup a callback if certificates are yet to be loaded, |
| 795 cert_library_->RequestCertificates(); | 795 if (!cert_library_->CertificatesLoaded()) |
| 796 cert_library_->AddObserver(this); |
| 796 | 797 |
| 797 // EAP method | 798 // EAP method |
| 798 layout->StartRow(0, column_view_set_id); | 799 layout->StartRow(0, column_view_set_id); |
| 799 layout->AddView(new views::Label(l10n_util::GetStringUTF16( | 800 layout->AddView(new views::Label(l10n_util::GetStringUTF16( |
| 800 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_EAP_METHOD))); | 801 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_EAP_METHOD))); |
| 801 eap_method_combobox_ = new views::Combobox(new EAPMethodComboboxModel()); | 802 eap_method_combobox_ = new views::Combobox(new EAPMethodComboboxModel()); |
| 802 eap_method_combobox_->set_listener(this); | 803 eap_method_combobox_->set_listener(this); |
| 803 layout->AddView(eap_method_combobox_); | 804 layout->AddView(eap_method_combobox_); |
| 804 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 805 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
| 805 | 806 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 // Set focus to a reasonable widget, depending on what we're showing. | 1073 // Set focus to a reasonable widget, depending on what we're showing. |
| 1073 if (ssid_textfield_) | 1074 if (ssid_textfield_) |
| 1074 ssid_textfield_->RequestFocus(); | 1075 ssid_textfield_->RequestFocus(); |
| 1075 else if (eap_method_combobox_) | 1076 else if (eap_method_combobox_) |
| 1076 eap_method_combobox_->RequestFocus(); | 1077 eap_method_combobox_->RequestFocus(); |
| 1077 else if (passphrase_textfield_ && passphrase_textfield_->IsEnabled()) | 1078 else if (passphrase_textfield_ && passphrase_textfield_->IsEnabled()) |
| 1078 passphrase_textfield_->RequestFocus(); | 1079 passphrase_textfield_->RequestFocus(); |
| 1079 } | 1080 } |
| 1080 | 1081 |
| 1081 } // namespace chromeos | 1082 } // namespace chromeos |
| OLD | NEW |