Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 9965017: views: Rename ComboboxListener::ItemChanged to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: combo_box -> combobox Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 if (passphrase_textfield_) { 562 if (passphrase_textfield_) {
563 passphrase_textfield_->SetObscured(!passphrase_textfield_->IsObscured()); 563 passphrase_textfield_->SetObscured(!passphrase_textfield_->IsObscured());
564 passphrase_visible_button_->SetToggled( 564 passphrase_visible_button_->SetToggled(
565 !passphrase_textfield_->IsObscured()); 565 !passphrase_textfield_->IsObscured());
566 } 566 }
567 } else { 567 } else {
568 NOTREACHED(); 568 NOTREACHED();
569 } 569 }
570 } 570 }
571 571
572 void WifiConfigView::ItemChanged(views::Combobox* combo_box, 572 void WifiConfigView::OnSelectedIndexChanged(views::Combobox* combobox) {
573 int prev_index, int new_index) { 573 if (combobox == security_combobox_) {
574 if (new_index == prev_index)
575 return;
576 if (combo_box == security_combobox_) {
577 bool passphrase_enabled = PassphraseActive(); 574 bool passphrase_enabled = PassphraseActive();
578 passphrase_label_->SetEnabled(passphrase_enabled); 575 passphrase_label_->SetEnabled(passphrase_enabled);
579 passphrase_textfield_->SetEnabled(passphrase_enabled && 576 passphrase_textfield_->SetEnabled(passphrase_enabled &&
580 passphrase_ui_data_.editable()); 577 passphrase_ui_data_.editable());
581 if (!passphrase_enabled) 578 if (!passphrase_enabled)
582 passphrase_textfield_->SetText(string16()); 579 passphrase_textfield_->SetText(string16());
583 RefreshShareCheckbox(); 580 RefreshShareCheckbox();
584 } else if (combo_box == user_cert_combobox_) { 581 } else if (combobox == user_cert_combobox_) {
585 RefreshShareCheckbox(); 582 RefreshShareCheckbox();
586 } else if (combo_box == eap_method_combobox_) { 583 } else if (combobox == eap_method_combobox_) {
587 RefreshEapFields(); 584 RefreshEapFields();
588 } 585 }
589 UpdateDialogButtons(); 586 UpdateDialogButtons();
590 UpdateErrorLabel(); 587 UpdateErrorLabel();
591 } 588 }
592 589
593 void WifiConfigView::OnCertificatesLoaded(bool initial_load) { 590 void WifiConfigView::OnCertificatesLoaded(bool initial_load) {
594 RefreshEapFields(); 591 RefreshEapFields();
595 UpdateDialogButtons(); 592 UpdateDialogButtons();
596 UpdateErrorLabel(); 593 UpdateErrorLabel();
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 void WifiConfigView::ParseWiFiEAPUIProperty( 1175 void WifiConfigView::ParseWiFiEAPUIProperty(
1179 NetworkPropertyUIData* property_ui_data, 1176 NetworkPropertyUIData* property_ui_data,
1180 Network* network, 1177 Network* network,
1181 const std::string& key) { 1178 const std::string& key) {
1182 ParseWiFiUIProperty( 1179 ParseWiFiUIProperty(
1183 property_ui_data, network, 1180 property_ui_data, network,
1184 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); 1181 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str()));
1185 } 1182 }
1186 1183
1187 } // namespace chromeos 1184 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wifi_config_view.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698