Chromium Code Reviews| Index: chrome/browser/chromeos/login/base_login_display_host.cc |
| diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc |
| index dfdd61e567a3dcd1e51b0237818dd9b2a43a4334..e82e962a81988787c3c4c24d1eef629f7d5e760c 100644 |
| --- a/chrome/browser/chromeos/login/base_login_display_host.cc |
| +++ b/chrome/browser/chromeos/login/base_login_display_host.cc |
| @@ -7,7 +7,6 @@ |
| #include "ash/desktop_background/desktop_background_controller.h" |
| #include "ash/shell.h" |
| #include "ash/shell_window_ids.h" |
| -#include "ash/wm/workspace_controller.h" // temporary until w2 is the default. |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| #include "base/file_util.h" |
| @@ -328,105 +327,8 @@ void BaseLoginDisplayHost::StartAnimation() { |
| return; |
| } |
| - // If we've been explicitly told not to do login animations, we will skip most |
| - // of them. In particular, we'll avoid animating the background or animating |
| - // the browser's transform. |
| - const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| - bool disable_animations = command_line->HasSwitch( |
|
Nikita (slow)
2012/10/17 14:43:11
Is this switch to disable login animations honored
sky
2012/10/17 14:56:02
Doesn't look like that code path was wired up for
|
| - switches::kDisableLoginAnimations); |
| - |
| - const bool do_background_animation = |
| - !ash::internal::WorkspaceController::IsWorkspace2Enabled() && |
| - kEnableBackgroundAnimation && !disable_animations; |
| - |
| - const bool do_browser_transform_animation = |
| - kEnableBrowserWindowsTransformAnimation && !disable_animations; |
| - |
| - const bool do_browser_opacity_animation = |
| - kEnableBrowserWindowsOpacityAnimation; |
| - |
| - // Background animation. |
| - if (do_background_animation) { |
| - ui::Layer* background_layer = |
| - ash::Shell::GetContainer( |
| - ash::Shell::GetPrimaryRootWindow(), |
| - ash::internal::kShellWindowId_DesktopBackgroundContainer)-> |
| - layer(); |
| - |
| - gfx::Transform background_transform; |
| - background_transform.SetScale(kBackgroundScale, kBackgroundScale); |
| - background_transform.SetTranslateX(kBackgroundTranslate); |
| - background_transform.SetTranslateY(kBackgroundTranslate); |
| - background_layer->SetTransform(background_transform); |
| - |
| - // Pause |
| - ui::LayerAnimationElement::AnimatableProperties background_pause_properties; |
| - background_pause_properties.insert(ui::LayerAnimationElement::TRANSFORM); |
| - background_layer->GetAnimator()->StartAnimation( |
| - new ui::LayerAnimationSequence( |
| - ui::LayerAnimationElement::CreatePauseElement( |
| - background_pause_properties, |
| - base::TimeDelta::FromMilliseconds( |
| - kBackgroundTransitionPauseMs)))); |
| - |
| - ui::ScopedLayerAnimationSettings settings(background_layer->GetAnimator()); |
| - settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); |
| - settings.SetTransitionDuration( |
| - base::TimeDelta::FromMilliseconds(kBackgroundTransitionDurationMs)); |
| - settings.SetTweenType(ui::Tween::EASE_OUT); |
| - background_layer->SetTransform(gfx::Transform()); |
| - } |
| - |
| // Browser windows layer opacity and transform animation. |
| - if (ash::internal::WorkspaceController::IsWorkspace2Enabled()) { |
| - ash::Shell::GetInstance()->DoInitialWorkspaceAnimation(); |
| - } else if (do_browser_transform_animation || do_browser_opacity_animation) { |
| - ui::Layer* default_container_layer = |
| - ash::Shell::GetContainer( |
| - ash::Shell::GetPrimaryRootWindow(), |
| - ash::internal::kShellWindowId_DefaultContainer)->layer(); |
| - |
| - ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; |
| - |
| - // Set the initial opacity and transform. |
| - if (do_browser_transform_animation) { |
| - gfx::Transform browser_transform; |
| - browser_transform.SetScale(kBrowserScale, kBrowserScale); |
| - browser_transform.SetTranslateX(kBrowserTranslate); |
| - browser_transform.SetTranslateY(kBrowserTranslate); |
| - default_container_layer->SetTransform(browser_transform); |
| - browser_pause_properties.insert(ui::LayerAnimationElement::TRANSFORM); |
| - } |
| - |
| - if (do_browser_opacity_animation) { |
| - default_container_layer->SetOpacity(0); |
| - browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); |
| - } |
| - |
| - // Pause. |
| - default_container_layer->GetAnimator()->ScheduleAnimation( |
| - new ui::LayerAnimationSequence( |
| - ui::LayerAnimationElement::CreatePauseElement( |
| - browser_pause_properties, |
| - base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs)))); |
| - |
| - ui::ScopedLayerAnimationSettings settings( |
| - default_container_layer->GetAnimator()); |
| - |
| - settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); |
| - settings.SetTransitionDuration( |
| - base::TimeDelta::FromMilliseconds(kBrowserTransitionDurationMs)); |
| - |
| - if (do_browser_opacity_animation) { |
| - // Should interpolate linearly. |
| - default_container_layer->SetOpacity(1); |
| - } |
| - |
| - if (do_browser_transform_animation) { |
| - settings.SetTweenType(ui::Tween::EASE_OUT); |
| - default_container_layer->SetTransform(gfx::Transform()); |
| - } |
| - } |
| + ash::Shell::GetInstance()->DoInitialWorkspaceAnimation(); |
| } |
| void BaseLoginDisplayHost::OnOwnershipStatusCheckDone( |