OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 145 } |
146 | 146 |
147 void WifiConfigView::ContentsChanged(views::Textfield* sender, | 147 void WifiConfigView::ContentsChanged(views::Textfield* sender, |
148 const string16& new_contents) { | 148 const string16& new_contents) { |
149 UpdateCanLogin(); | 149 UpdateCanLogin(); |
150 } | 150 } |
151 | 151 |
152 bool WifiConfigView::HandleKeyEvent(views::Textfield* sender, | 152 bool WifiConfigView::HandleKeyEvent(views::Textfield* sender, |
153 const views::KeyEvent& key_event) { | 153 const views::KeyEvent& key_event) { |
154 if (sender == passphrase_textfield_ && | 154 if (sender == passphrase_textfield_ && |
155 key_event.GetKeyCode() == app::VKEY_RETURN) { | 155 key_event.GetKeyCode() == ui::VKEY_RETURN) { |
156 parent_->GetDialogClientView()->AcceptWindow(); | 156 parent_->GetDialogClientView()->AcceptWindow(); |
157 } | 157 } |
158 return false; | 158 return false; |
159 } | 159 } |
160 | 160 |
161 void WifiConfigView::ButtonPressed(views::Button* sender, | 161 void WifiConfigView::ButtonPressed(views::Button* sender, |
162 const views::Event& event) { | 162 const views::Event& event) { |
163 if (sender == passphrase_visible_button_) { | 163 if (sender == passphrase_visible_button_) { |
164 if (passphrase_textfield_) | 164 if (passphrase_textfield_) |
165 passphrase_textfield_->SetPassword(!passphrase_textfield_->IsPassword()); | 165 passphrase_textfield_->SetPassword(!passphrase_textfield_->IsPassword()); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 error_label_ = new views::Label(); | 408 error_label_ = new views::Label(); |
409 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 409 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
410 error_label_->SetColor(SK_ColorRED); | 410 error_label_->SetColor(SK_ColorRED); |
411 layout->AddView(error_label_); | 411 layout->AddView(error_label_); |
412 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 412 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
413 // Set or hide the error text. | 413 // Set or hide the error text. |
414 UpdateErrorLabel(false); | 414 UpdateErrorLabel(false); |
415 } | 415 } |
416 | 416 |
417 } // namespace chromeos | 417 } // namespace chromeos |
OLD | NEW |