diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-26 17:54:38 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-26 17:54:38 +0000 |
commit | cf9f2ee2654a53038c8d6b3c458b267bd6c66f82 (patch) | |
tree | fc54172eba4ff9ca3f485a93fe3de6a6e318ef67 | |
parent | 7ae1fa6aa39d69c391d7fc5b922fd0f1f9ceedb4 (diff) | |
download | chromium_src-cf9f2ee2654a53038c8d6b3c458b267bd6c66f82.zip chromium_src-cf9f2ee2654a53038c8d6b3c458b267bd6c66f82.tar.gz chromium_src-cf9f2ee2654a53038c8d6b3c458b267bd6c66f82.tar.bz2 |
[cros] WebUI: use correct visibility for StatusArea on boot.
Now that StatusArea creation is deferred till page is loaded have to save visibility state that is changed via WebUILoginDisplayHost.
BUG=chromium-os:19587
TEST=Manual.
Review URL: http://codereview.chromium.org/7748041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98448 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/login/webui_login_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/webui_login_view.h | 3 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/wizard_controller.cc | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc index ada0eae..6445ea6 100644 --- a/chrome/browser/chromeos/login/webui_login_view.cc +++ b/chrome/browser/chromeos/login/webui_login_view.cc @@ -46,7 +46,8 @@ WebUILoginView::WebUILoginView() profile_(NULL), webui_login_(NULL), status_window_(NULL), - host_window_frozen_(false) { + host_window_frozen_(false), + status_area_visibility_on_init_(true) { #if defined(TOUCH_UI) // Make sure the singleton KeyboardManager object is created. KeyboardManager::GetInstance(); @@ -137,6 +138,8 @@ void WebUILoginView::SetStatusAreaEnabled(bool enable) { void WebUILoginView::SetStatusAreaVisible(bool visible) { if (status_area_) status_area_->SetVisible(visible); + else + status_area_visibility_on_init_ = visible; } // WebUILoginView protected: --------------------------------------------------- @@ -221,6 +224,7 @@ void WebUILoginView::InitStatusArea() { DCHECK(status_window_ == NULL); status_area_ = new StatusAreaView(this); status_area_->Init(); + status_area_->SetVisible(status_area_visibility_on_init_); views::Widget* login_window = WebUILoginDisplay::GetLoginWindow(); gfx::Size size = status_area_->GetPreferredSize(); diff --git a/chrome/browser/chromeos/login/webui_login_view.h b/chrome/browser/chromeos/login/webui_login_view.h index 72b7b64..38912d3 100644 --- a/chrome/browser/chromeos/login/webui_login_view.h +++ b/chrome/browser/chromeos/login/webui_login_view.h @@ -135,6 +135,9 @@ class WebUILoginView : public views::View, // Whether the host window is frozen. bool host_window_frozen_; + // Caches StatusArea visibility setting before it has been initialized. + bool status_area_visibility_on_init_; + DISALLOW_COPY_AND_ASSIGN(WebUILoginView); }; diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index beaa961..a2445314 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc @@ -238,12 +238,14 @@ chromeos::EnterpriseEnrollmentScreen* } void WizardController::ShowNetworkScreen() { + VLOG(1) << "Showing network screen."; SetStatusAreaVisible(false); SetCurrentScreen(GetNetworkScreen()); host_->SetOobeProgress(chromeos::BackgroundView::SELECT_NETWORK); } void WizardController::ShowLoginScreen() { + VLOG(1) << "Showing login screen."; SetStatusAreaVisible(true); host_->SetOobeProgress(chromeos::BackgroundView::SIGNIN); host_->StartSignInScreen(); |