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

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

Issue 9117012: Rename visual style "password" to "obscured" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 11 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 key_event.key_code() == ui::VKEY_RETURN) { 503 key_event.key_code() == ui::VKEY_RETURN) {
504 parent_->GetDialogClientView()->AcceptWindow(); 504 parent_->GetDialogClientView()->AcceptWindow();
505 } 505 }
506 return false; 506 return false;
507 } 507 }
508 508
509 void WifiConfigView::ButtonPressed(views::Button* sender, 509 void WifiConfigView::ButtonPressed(views::Button* sender,
510 const views::Event& event) { 510 const views::Event& event) {
511 if (sender == passphrase_visible_button_) { 511 if (sender == passphrase_visible_button_) {
512 if (passphrase_textfield_) { 512 if (passphrase_textfield_) {
513 passphrase_textfield_->SetPassword(!passphrase_textfield_->IsPassword()); 513 passphrase_textfield_->SetObscured(!passphrase_textfield_->IsObscured());
514 passphrase_visible_button_->SetToggled( 514 passphrase_visible_button_->SetToggled(
515 !passphrase_textfield_->IsPassword()); 515 !passphrase_textfield_->IsObscured());
516 } 516 }
517 } else { 517 } else {
518 NOTREACHED(); 518 NOTREACHED();
519 } 519 }
520 } 520 }
521 521
522 void WifiConfigView::ItemChanged(views::Combobox* combo_box, 522 void WifiConfigView::ItemChanged(views::Combobox* combo_box,
523 int prev_index, int new_index) { 523 int prev_index, int new_index) {
524 if (new_index == prev_index) 524 if (new_index == prev_index)
525 return; 525 return;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 897 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
898 } 898 }
899 899
900 // Passphrase input 900 // Passphrase input
901 layout->StartRow(0, column_view_set_id); 901 layout->StartRow(0, column_view_set_id);
902 int label_text_id = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE; 902 int label_text_id = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE;
903 passphrase_label_ = new views::Label( 903 passphrase_label_ = new views::Label(
904 l10n_util::GetStringUTF16(label_text_id)); 904 l10n_util::GetStringUTF16(label_text_id));
905 layout->AddView(passphrase_label_); 905 layout->AddView(passphrase_label_);
906 passphrase_textfield_ = new views::Textfield( 906 passphrase_textfield_ = new views::Textfield(
907 views::Textfield::STYLE_PASSWORD); 907 views::Textfield::STYLE_OBSCURED);
908 passphrase_textfield_->SetController(this); 908 passphrase_textfield_->SetController(this);
909 if (wifi && !wifi->GetPassphrase().empty()) 909 if (wifi && !wifi->GetPassphrase().empty())
910 passphrase_textfield_->SetText(UTF8ToUTF16(wifi->GetPassphrase())); 910 passphrase_textfield_->SetText(UTF8ToUTF16(wifi->GetPassphrase()));
911 // Disable passphrase input initially for other network. 911 // Disable passphrase input initially for other network.
912 if (!wifi) { 912 if (!wifi) {
913 passphrase_label_->SetEnabled(false); 913 passphrase_label_->SetEnabled(false);
914 passphrase_textfield_->SetEnabled(false); 914 passphrase_textfield_->SetEnabled(false);
915 } 915 }
916 passphrase_textfield_->SetAccessibleName(l10n_util::GetStringUTF16( 916 passphrase_textfield_->SetAccessibleName(l10n_util::GetStringUTF16(
917 label_text_id)); 917 label_text_id));
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 void WifiConfigView::ParseWiFiEAPUIProperty( 1144 void WifiConfigView::ParseWiFiEAPUIProperty(
1145 NetworkPropertyUIData* property_ui_data, 1145 NetworkPropertyUIData* property_ui_data,
1146 Network* network, 1146 Network* network,
1147 const std::string& key) { 1147 const std::string& key) {
1148 ParseWiFiUIProperty( 1148 ParseWiFiUIProperty(
1149 property_ui_data, network, 1149 property_ui_data, network,
1150 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); 1150 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str()));
1151 } 1151 }
1152 1152
1153 } // namespace chromeos 1153 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/vpn_config_view.cc ('k') | chrome/browser/ui/views/crypto_module_password_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698