Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/login/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 // Fade out transition for sign in screen. | 322 // Fade out transition for sign in screen. |
| 323 // BaseLoginDisplayHost will be deleted this animation is ended. | 323 // BaseLoginDisplayHost will be deleted this animation is ended. |
| 324 ui::Layer* layer = GetLayer(GetWidget()); | 324 ui::Layer* layer = GetLayer(GetWidget()); |
| 325 layer->GetAnimator()->AddObserver(this); | 325 layer->GetAnimator()->AddObserver(this); |
| 326 ui::LayerAnimator::ScopedSettings signin_animation(layer->GetAnimator()); | 326 ui::LayerAnimator::ScopedSettings signin_animation(layer->GetAnimator()); |
| 327 signin_animation.SetTransitionDuration( | 327 signin_animation.SetTransitionDuration( |
| 328 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); | 328 base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs)); |
| 329 layer->SetOpacity(0.0f); | 329 layer->SetOpacity(0.0f); |
| 330 | 330 |
| 331 // Background animation. | 331 // Background animation. |
| 332 if (kEnableBackgroundAnimation) { | 332 if (kEnableBackgroundAnimation) { |
|
James Cook
2012/01/13 00:42:12
Should this also check IsWindowModeCompact()? Com
| |
| 333 ui::Transform background_transform; | 333 ui::Transform background_transform; |
| 334 background_transform.SetScale(kBackgroundScale, kBackgroundScale); | 334 background_transform.SetScale(kBackgroundScale, kBackgroundScale); |
| 335 background_transform.SetTranslateX(kBackgroundTranslate); | 335 background_transform.SetTranslateX(kBackgroundTranslate); |
| 336 background_transform.SetTranslateY(kBackgroundTranslate); | 336 background_transform.SetTranslateY(kBackgroundTranslate); |
| 337 scoped_ptr<ui::LayerAnimationElement> | 337 scoped_ptr<ui::LayerAnimationElement> |
| 338 background_transform_animation_initial( | 338 background_transform_animation_initial( |
| 339 ui::LayerAnimationElement::CreateTransformElement( | 339 ui::LayerAnimationElement::CreateTransformElement( |
| 340 background_transform, | 340 background_transform, |
| 341 base::TimeDelta())); | 341 base::TimeDelta())); |
| 342 ui::LayerAnimationElement::AnimatableProperties background_pause_properties; | 342 ui::LayerAnimationElement::AnimatableProperties background_pause_properties; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 356 background_transition->AddElement(background_pause.release()); | 356 background_transition->AddElement(background_pause.release()); |
| 357 background_transition->AddElement(background_transform_animation.release()); | 357 background_transition->AddElement(background_transform_animation.release()); |
| 358 ui::Layer* background_layer = | 358 ui::Layer* background_layer = |
| 359 ash::Shell::GetInstance()->GetContainer( | 359 ash::Shell::GetInstance()->GetContainer( |
| 360 ash::internal::kShellWindowId_DesktopBackgroundContainer)-> | 360 ash::internal::kShellWindowId_DesktopBackgroundContainer)-> |
| 361 layer(); | 361 layer(); |
| 362 background_layer->GetAnimator()->StartAnimation( | 362 background_layer->GetAnimator()->StartAnimation( |
| 363 background_transition.release()); | 363 background_transition.release()); |
| 364 } | 364 } |
| 365 | 365 |
| 366 // Browser windows layer opacity animation. | 366 // Browser windows layer opacity animation. Don't fade in the |
| 367 if (kEnableBrowserWindowsOpacityAnimation) { | 367 // browser in compact mode because there is nothing behind it. |
| 368 if (kEnableBrowserWindowsOpacityAnimation && | |
| 369 !ash::Shell::GetInstance()->IsWindowModeCompact()) { | |
| 368 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation_initial( | 370 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation_initial( |
| 369 ui::LayerAnimationElement::CreateOpacityElement( | 371 ui::LayerAnimationElement::CreateOpacityElement( |
| 370 0.0f, | 372 0.0f, |
| 371 base::TimeDelta())); | 373 base::TimeDelta())); |
| 372 ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; | 374 ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; |
| 373 browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); | 375 browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); |
| 374 scoped_ptr<ui::LayerAnimationElement> browser_pause_animation( | 376 scoped_ptr<ui::LayerAnimationElement> browser_pause_animation( |
| 375 ui::LayerAnimationElement::CreatePauseElement( | 377 ui::LayerAnimationElement::CreatePauseElement( |
| 376 browser_pause_properties, | 378 browser_pause_properties, |
| 377 base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs))); | 379 base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs))); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 586 // user has changed to during OOBE. | 588 // user has changed to during OOBE. |
| 587 if (!timezone_name.empty()) { | 589 if (!timezone_name.empty()) { |
| 588 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 590 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 589 icu::UnicodeString::fromUTF8(timezone_name)); | 591 icu::UnicodeString::fromUTF8(timezone_name)); |
| 590 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 592 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 591 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 593 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 592 } | 594 } |
| 593 } | 595 } |
| 594 | 596 |
| 595 } // namespace browser | 597 } // namespace browser |
| OLD | NEW |