Don't show tray on OOBE boot.

New OOBE boot up sequence revealed an issue when tray was shown on boot, then hidden again.

1. OOBE WebUI is not initialized as it waits for wallpaper animation to finish. That means tray was not hidden by WebUI.
3. Wallpaper animations happens
4. At some point tray is shown
5. WebUI is initialized, tray is hidden.

BUG=133279
TEST=Manual

Review URL: https://chromiumcodereview.appspot.com/10827009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148387 0039d316-1c4b-4281-b951-d872f2087c98
parent be6a9b57
......@@ -218,6 +218,7 @@ void BaseLoginDisplayHost::StartSignInScreen() {
sign_in_controller_.reset(new chromeos::ExistingUserController(this));
oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered();
SetOobeProgressBarVisible(oobe_progress_bar_visible_);
SetStatusAreaVisible(true);
SetShutdownButtonEnabled(true);
sign_in_controller_->Init(users);
......@@ -244,6 +245,7 @@ void BaseLoginDisplayHost::ResumeSignInScreen() {
DVLOG(1) << "Resuming sign in screen";
CHECK(sign_in_controller_.get());
SetOobeProgressBarVisible(oobe_progress_bar_visible_);
SetStatusAreaVisible(true);
SetShutdownButtonEnabled(true);
sign_in_controller_->ResumeLogin();
}
......
......@@ -236,11 +236,14 @@ void WebUILoginView::OpenProxySettings() {
void WebUILoginView::SetStatusAreaVisible(bool visible) {
ash::SystemTray* tray = ash::Shell::GetInstance()->system_tray();
if (tray) {
if (visible)
if (visible) {
// Tray may have been initialized being hidden.
tray->SetVisible(visible);
tray->GetWidget()->Show();
else
} else {
tray->GetWidget()->Hide();
}
}
}
// WebUILoginView protected: ---------------------------------------------------
......
......@@ -47,6 +47,7 @@
#include "chrome/browser/chromeos/login/message_bubble.h"
#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/mobile_config.h"
#include "chrome/browser/chromeos/status/data_promo_notification.h"
#include "chrome/browser/chromeos/status/network_menu.h"
......@@ -257,8 +258,12 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
virtual bool GetTrayVisibilityOnStartup() OVERRIDE {
// If we're either logged in (doesn't matter in KioskMode or not),
// or not in KioskMode at all, return true.
// If not registered i.e. OOBE is still active, start with tray hidden,
// it will be enabled if needed by OOBE flow.
bool is_registered = chromeos::WizardController::IsDeviceRegistered();
return UserManager::Get()->IsUserLoggedIn() ||
!chromeos::KioskModeSettings::Get()->IsKioskModeEnabled();
(!chromeos::KioskModeSettings::Get()->IsKioskModeEnabled() &&
is_registered);
}
virtual const string16 GetUserDisplayName() const OVERRIDE {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment