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" |
11 #include "chrome/browser/chromeos/cros/network_library.h" | 11 #include "chrome/browser/chromeos/cros/network_library.h" |
12 #include "chrome/browser/chromeos/cros/onc_constants.h" | 12 #include "chrome/browser/chromeos/cros/onc_constants.h" |
13 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 13 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
14 #include "chrome/browser/chromeos/login/user_manager.h" | 14 #include "chrome/browser/chromeos/login/user_manager.h" |
15 #include "chrome/browser/chromeos/login/wizard_controller.h" | 15 #include "chrome/browser/chromeos/login/wizard_controller.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "grit/chromium_strings.h" | 17 #include "grit/chromium_strings.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 #include "grit/locale_settings.h" | 19 #include "grit/locale_settings.h" |
20 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 21 #include "ui/base/event.h" |
21 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
22 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
23 #include "ui/views/controls/button/checkbox.h" | 24 #include "ui/views/controls/button/checkbox.h" |
24 #include "ui/views/controls/button/image_button.h" | 25 #include "ui/views/controls/button/image_button.h" |
25 #include "ui/views/controls/label.h" | 26 #include "ui/views/controls/label.h" |
26 #include "ui/views/controls/textfield/textfield.h" | 27 #include "ui/views/controls/textfield/textfield.h" |
27 #include "ui/views/layout/grid_layout.h" | 28 #include "ui/views/layout/grid_layout.h" |
28 #include "ui/views/layout/layout_constants.h" | 29 #include "ui/views/layout/layout_constants.h" |
29 #include "ui/views/widget/widget.h" | 30 #include "ui/views/widget/widget.h" |
30 | 31 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 error_label_->SetVisible(false); | 104 error_label_->SetVisible(false); |
104 } | 105 } |
105 } | 106 } |
106 | 107 |
107 void WimaxConfigView::ContentsChanged(views::Textfield* sender, | 108 void WimaxConfigView::ContentsChanged(views::Textfield* sender, |
108 const string16& new_contents) { | 109 const string16& new_contents) { |
109 UpdateDialogButtons(); | 110 UpdateDialogButtons(); |
110 } | 111 } |
111 | 112 |
112 bool WimaxConfigView::HandleKeyEvent(views::Textfield* sender, | 113 bool WimaxConfigView::HandleKeyEvent(views::Textfield* sender, |
113 const views::KeyEvent& key_event) { | 114 const ui::KeyEvent& key_event) { |
114 if (sender == passphrase_textfield_ && | 115 if (sender == passphrase_textfield_ && |
115 key_event.key_code() == ui::VKEY_RETURN) { | 116 key_event.key_code() == ui::VKEY_RETURN) { |
116 parent_->GetDialogClientView()->AcceptWindow(); | 117 parent_->GetDialogClientView()->AcceptWindow(); |
117 } | 118 } |
118 return false; | 119 return false; |
119 } | 120 } |
120 | 121 |
121 void WimaxConfigView::ButtonPressed(views::Button* sender, | 122 void WimaxConfigView::ButtonPressed(views::Button* sender, |
122 const views::Event& event) { | 123 const views::Event& event) { |
123 if (sender == passphrase_visible_button_) { | 124 if (sender == passphrase_visible_button_) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 UpdateErrorLabel(); | 329 UpdateErrorLabel(); |
329 } | 330 } |
330 | 331 |
331 void WimaxConfigView::InitFocus() { | 332 void WimaxConfigView::InitFocus() { |
332 views::View* view_to_focus = GetInitiallyFocusedView(); | 333 views::View* view_to_focus = GetInitiallyFocusedView(); |
333 if (view_to_focus) | 334 if (view_to_focus) |
334 view_to_focus->RequestFocus(); | 335 view_to_focus->RequestFocus(); |
335 } | 336 } |
336 | 337 |
337 } // namespace chromeos | 338 } // namespace chromeos |
OLD | NEW |