Add --disable-oobe-animation flag to disable OOBE animation on slow hardware

BUG=142724
TEST=manual

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152060 0039d316-1c4b-4281-b951-d872f2087c98
parent 8a002d30
......@@ -52,10 +52,14 @@ class UserWallpaperDelegate : public ash::UserWallpaperDelegate {
// It is a first boot case now. If kDisableBootAnimation flag
// is passed, it only disables any transition after OOBE.
// |kDisableOobeAnimation| disables OOBE animation for slow hardware.
bool is_registered = WizardController::IsDeviceRegistered();
bool disable_boot_animation = CommandLine::ForCurrentProcess()->
const CommandLine* command_line = CommandLine::ForCurrentProcess();
bool disable_boot_animation = command_line->
HasSwitch(switches::kDisableBootAnimation);
if (is_registered && disable_boot_animation)
bool disable_oobe_animation = command_line->
HasSwitch(switches::kDisableOobeAnimation);
if (disable_oobe_animation || (is_registered && disable_boot_animation))
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE;
......
......@@ -753,6 +753,7 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine(
::switches::kDisableAcceleratedVideoDecode,
::switches::kDisableGpuWatchdog,
::switches::kDisableLoginAnimations,
::switches::kDisableOobeAnimation,
::switches::kDisableSeccompFilterSandbox,
::switches::kDisableSeccompSandbox,
::switches::kDisableThreadedAnimation,
......
......@@ -71,6 +71,8 @@ WebUILoginDisplayHost::WebUILoginDisplayHost(const gfx::Rect& background_bounds)
bool is_registered = WizardController::IsDeviceRegistered();
bool zero_delay_enabled = WizardController::IsZeroDelayEnabled();
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableOobeAnimation) &&
!zero_delay_enabled) {
bool disable_boot_animation = CommandLine::ForCurrentProcess()->
HasSwitch(switches::kDisableBootAnimation);
......@@ -139,7 +141,7 @@ void WebUILoginDisplayHost::SetShutdownButtonEnabled(bool enable) {
}
void WebUILoginDisplayHost::SetStatusAreaVisible(bool visible) {
if (waiting_for_wallpaper_load_ && initialize_webui_in_parallel_)
if (waiting_for_wallpaper_load_ && initialize_webui_in_parallel_)
status_area_saved_visibility_ = visible;
else if (login_view_)
login_view_->SetStatusAreaVisible(visible);
......
......@@ -348,9 +348,6 @@ const char kDisableIPPooling[] = "disable-ip-pooling";
const char kDisableNonFullscreenMouseLock[] =
"disable-non-fullscreen-mouse-lock";
// Avoid doing expensive animations upon login.
const char kDisableLoginAnimations[] = "disable-login-animations";
// Disables the menu on the NTP for accessing sessions from other devices.
const char kDisableNTPOtherSessionsMenu[] = "disable-ntp-other-sessions-menu";
......@@ -1386,9 +1383,15 @@ const char kDisableGData[] = "disable-gdata";
// Disables new WebRTC implementation of user image picker.
const char kDisableHtml5Camera[] = "disable-html5-camera";
// Avoid doing expensive animations upon login.
const char kDisableLoginAnimations[] = "disable-login-animations";
// Disables new OOBE/sign in design.
const char kDisableNewOobe[] = "disable-new-oobe";
// Avoid doing animations upon oobe.
const char kDisableOobeAnimation[] = "disable-oobe-animation";
// Enables touchpad three-finger-click as middle button.
const char kEnableTouchpadThreeFingerClick[]
= "touchpad-enable-three-finger-click";
......
......@@ -101,7 +101,6 @@ extern const char kDisableIPv6[];
extern const char kDisableIPPooling[];
extern const char kDisableNonFullscreenMouseLock[];
extern const char kDisableNTPOtherSessionsMenu[];
extern const char kDisableLoginAnimations[];
extern const char kDisablePopupBlocking[];
extern const char kDisablePreconnect[];
extern const char kDisablePromptOnRepost[];
......@@ -375,7 +374,9 @@ extern const char kAshWebUIInit[];
extern const char kDisableBootAnimation[];
extern const char kDisableGData[];
extern const char kDisableHtml5Camera[];
extern const char kDisableLoginAnimations[];
extern const char kDisableNewOobe[];
extern const char kDisableOobeAnimation[];
extern const char kEnableTouchpadThreeFingerClick[];
extern const char kSkipOAuthLogin[];
extern const char kEnableDevicePolicy[];
......
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