OLD | NEW |
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/wimax_config_view.h" | 5 #include "chrome/browser/chromeos/options/wimax_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 bool WimaxConfigView::HandleKeyEvent(views::Textfield* sender, | 113 bool WimaxConfigView::HandleKeyEvent(views::Textfield* sender, |
114 const ui::KeyEvent& key_event) { | 114 const ui::KeyEvent& key_event) { |
115 if (sender == passphrase_textfield_ && | 115 if (sender == passphrase_textfield_ && |
116 key_event.key_code() == ui::VKEY_RETURN) { | 116 key_event.key_code() == ui::VKEY_RETURN) { |
117 parent_->GetDialogClientView()->AcceptWindow(); | 117 parent_->GetDialogClientView()->AcceptWindow(); |
118 } | 118 } |
119 return false; | 119 return false; |
120 } | 120 } |
121 | 121 |
122 void WimaxConfigView::ButtonPressed(views::Button* sender, | 122 void WimaxConfigView::ButtonPressed(views::Button* sender, |
123 const views::Event& event) { | 123 const ui::Event& event) { |
124 if (sender == passphrase_visible_button_) { | 124 if (sender == passphrase_visible_button_) { |
125 if (passphrase_textfield_) { | 125 if (passphrase_textfield_) { |
126 passphrase_textfield_->SetObscured(!passphrase_textfield_->IsObscured()); | 126 passphrase_textfield_->SetObscured(!passphrase_textfield_->IsObscured()); |
127 passphrase_visible_button_->SetToggled( | 127 passphrase_visible_button_->SetToggled( |
128 !passphrase_textfield_->IsObscured()); | 128 !passphrase_textfield_->IsObscured()); |
129 } | 129 } |
130 } else { | 130 } else { |
131 NOTREACHED(); | 131 NOTREACHED(); |
132 } | 132 } |
133 } | 133 } |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 UpdateErrorLabel(); | 329 UpdateErrorLabel(); |
330 } | 330 } |
331 | 331 |
332 void WimaxConfigView::InitFocus() { | 332 void WimaxConfigView::InitFocus() { |
333 views::View* view_to_focus = GetInitiallyFocusedView(); | 333 views::View* view_to_focus = GetInitiallyFocusedView(); |
334 if (view_to_focus) | 334 if (view_to_focus) |
335 view_to_focus->RequestFocus(); | 335 view_to_focus->RequestFocus(); |
336 } | 336 } |
337 | 337 |
338 } // namespace chromeos | 338 } // namespace chromeos |
OLD | NEW |