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

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

Issue 14362031: Move part of WizardController static code to StartupUtils (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/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/enrollment_dialog_view.h" 12 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
13 #include "chrome/browser/chromeos/login/wizard_controller.h" 13 #include "chrome/browser/chromeos/login/startup_utils.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chromeos/login/login_state.h" 15 #include "chromeos/login/login_state.h"
16 #include "chromeos/network/onc/onc_constants.h" 16 #include "chromeos/network/onc/onc_constants.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/events/event.h" 21 #include "ui/base/events/event.h"
22 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 #include "ui/base/resource/resource_bundle.h" 23 #include "ui/base/resource/resource_bundle.h"
(...skipping 28 matching lines...) Expand all
52 views::View* WimaxConfigView::GetInitiallyFocusedView() { 52 views::View* WimaxConfigView::GetInitiallyFocusedView() {
53 if (identity_textfield_ && identity_textfield_->enabled()) 53 if (identity_textfield_ && identity_textfield_->enabled())
54 return identity_textfield_; 54 return identity_textfield_;
55 if (passphrase_textfield_ && passphrase_textfield_->enabled()) 55 if (passphrase_textfield_ && passphrase_textfield_->enabled())
56 return passphrase_textfield_; 56 return passphrase_textfield_;
57 return NULL; 57 return NULL;
58 } 58 }
59 59
60 bool WimaxConfigView::CanLogin() { 60 bool WimaxConfigView::CanLogin() {
61 // In OOBE it may be valid to log in with no credentials (crbug.com/137776). 61 // In OOBE it may be valid to log in with no credentials (crbug.com/137776).
62 if (!chromeos::WizardController::IsOobeCompleted()) 62 if (!chromeos::StartupUtils::IsOobeCompleted())
63 return true; 63 return true;
64 64
65 // TODO(benchan): Update this with the correct minimum length (don't just 65 // TODO(benchan): Update this with the correct minimum length (don't just
66 // check if empty). 66 // check if empty).
67 // If the network requires a passphrase, make sure it is the right length. 67 // If the network requires a passphrase, make sure it is the right length.
68 return passphrase_textfield_ && !passphrase_textfield_->text().empty(); 68 return passphrase_textfield_ && !passphrase_textfield_->text().empty();
69 } 69 }
70 70
71 void WimaxConfigView::UpdateDialogButtons() { 71 void WimaxConfigView::UpdateDialogButtons() {
72 parent_->GetDialogClientView()->UpdateDialogButtons(); 72 parent_->GetDialogClientView()->UpdateDialogButtons();
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 UpdateErrorLabel(); 333 UpdateErrorLabel();
334 } 334 }
335 335
336 void WimaxConfigView::InitFocus() { 336 void WimaxConfigView::InitFocus() {
337 views::View* view_to_focus = GetInitiallyFocusedView(); 337 views::View* view_to_focus = GetInitiallyFocusedView();
338 if (view_to_focus) 338 if (view_to_focus)
339 view_to_focus->RequestFocus(); 339 view_to_focus->RequestFocus();
340 } 340 }
341 341
342 } // namespace chromeos 342 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698