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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 passphrase_label_->SetEnabled(true); | 262 passphrase_label_->SetEnabled(true); |
263 passphrase_textfield_->SetEnabled(passphrase_ui_data_.IsEditable()); | 263 passphrase_textfield_->SetEnabled(passphrase_ui_data_.IsEditable()); |
264 passphrase_textfield_->SetAccessibleName(passphrase_label_text); | 264 passphrase_textfield_->SetAccessibleName(passphrase_label_text); |
265 layout->AddView(passphrase_textfield_); | 265 layout->AddView(passphrase_textfield_); |
266 | 266 |
267 if (passphrase_ui_data_.IsManaged()) { | 267 if (passphrase_ui_data_.IsManaged()) { |
268 layout->AddView(new ControlledSettingIndicatorView(passphrase_ui_data_)); | 268 layout->AddView(new ControlledSettingIndicatorView(passphrase_ui_data_)); |
269 } else { | 269 } else { |
270 // Password visible button. | 270 // Password visible button. |
271 passphrase_visible_button_ = new views::ToggleImageButton(this); | 271 passphrase_visible_button_ = new views::ToggleImageButton(this); |
272 passphrase_visible_button_->SetFocusBehavior(FocusBehavior::ALWAYS); | 272 views::Button::ConfigureDefaultFocus(passphrase_visible_button_); |
273 passphrase_visible_button_->SetTooltipText( | 273 passphrase_visible_button_->SetTooltipText( |
274 l10n_util::GetStringUTF16( | 274 l10n_util::GetStringUTF16( |
275 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_SHOW)); | 275 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_SHOW)); |
276 passphrase_visible_button_->SetToggledTooltipText( | 276 passphrase_visible_button_->SetToggledTooltipText( |
277 l10n_util::GetStringUTF16( | 277 l10n_util::GetStringUTF16( |
278 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_HIDE)); | 278 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_HIDE)); |
279 passphrase_visible_button_->SetImage( | 279 passphrase_visible_button_->SetImage( |
280 views::ImageButton::STATE_NORMAL, | 280 views::ImageButton::STATE_NORMAL, |
281 ResourceBundle::GetSharedInstance(). | 281 ResourceBundle::GetSharedInstance(). |
282 GetImageSkiaNamed(IDR_NETWORK_SHOW_PASSWORD)); | 282 GetImageSkiaNamed(IDR_NETWORK_SHOW_PASSWORD)); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 } | 373 } |
374 | 374 |
375 void WimaxConfigView::InitFocus() { | 375 void WimaxConfigView::InitFocus() { |
376 views::View* view_to_focus = GetInitiallyFocusedView(); | 376 views::View* view_to_focus = GetInitiallyFocusedView(); |
377 if (view_to_focus) | 377 if (view_to_focus) |
378 view_to_focus->RequestFocus(); | 378 view_to_focus->RequestFocus(); |
379 } | 379 } |
380 | 380 |
381 } // namespace chromeos | 381 } // namespace chromeos |
OLD | NEW |