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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 #if defined(USE_AURA) | 321 #if defined(USE_AURA) |
| 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 if (ash::Shell::GetInstance()->GetContainer( | |
| 332 ash::internal::kShellWindowId_DesktopBackgroundContainer)-> | |
| 333 children().empty()) { | |
| 334 // If there is no background window, don't perform any animation on the | |
| 335 // default and background layer because there is nothing behind it. | |
| 336 return; | |
| 337 } | |
| 338 | |
| 331 // Background animation. | 339 // Background animation. |
| 332 if (kEnableBackgroundAnimation) { | 340 if (kEnableBackgroundAnimation) { |
| 333 ui::Transform background_transform; | 341 ui::Transform background_transform; |
| 334 background_transform.SetScale(kBackgroundScale, kBackgroundScale); | 342 background_transform.SetScale(kBackgroundScale, kBackgroundScale); |
| 335 background_transform.SetTranslateX(kBackgroundTranslate); | 343 background_transform.SetTranslateX(kBackgroundTranslate); |
| 336 background_transform.SetTranslateY(kBackgroundTranslate); | 344 background_transform.SetTranslateY(kBackgroundTranslate); |
| 337 scoped_ptr<ui::LayerAnimationElement> | 345 scoped_ptr<ui::LayerAnimationElement> |
| 338 background_transform_animation_initial( | 346 background_transform_animation_initial( |
| 339 ui::LayerAnimationElement::CreateTransformElement( | 347 ui::LayerAnimationElement::CreateTransformElement( |
| 340 background_transform, | 348 background_transform, |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 358 ui::Layer* background_layer = | 366 ui::Layer* background_layer = |
| 359 ash::Shell::GetInstance()->GetContainer( | 367 ash::Shell::GetInstance()->GetContainer( |
| 360 ash::internal::kShellWindowId_DesktopBackgroundContainer)-> | 368 ash::internal::kShellWindowId_DesktopBackgroundContainer)-> |
| 361 layer(); | 369 layer(); |
| 362 background_layer->GetAnimator()->StartAnimation( | 370 background_layer->GetAnimator()->StartAnimation( |
| 363 background_transition.release()); | 371 background_transition.release()); |
| 364 } | 372 } |
| 365 | 373 |
| 366 // Browser windows layer opacity animation. | 374 // Browser windows layer opacity animation. |
| 367 if (kEnableBrowserWindowsOpacityAnimation) { | 375 if (kEnableBrowserWindowsOpacityAnimation) { |
| 368 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation_initial( | 376 scoped_ptr<ui::LayerAnimationElement> br |
|
Nikita (slow)
2012/01/13 10:16:30
Please fix.
oshima
2012/01/13 18:35:57
oops. done.
| |
| 377 owser_opacity_animation_initial( | |
| 369 ui::LayerAnimationElement::CreateOpacityElement( | 378 ui::LayerAnimationElement::CreateOpacityElement( |
| 370 0.0f, | 379 0.0f, |
| 371 base::TimeDelta())); | 380 base::TimeDelta())); |
| 372 ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; | 381 ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; |
| 373 browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); | 382 browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); |
| 374 scoped_ptr<ui::LayerAnimationElement> browser_pause_animation( | 383 scoped_ptr<ui::LayerAnimationElement> browser_pause_animation( |
| 375 ui::LayerAnimationElement::CreatePauseElement( | 384 ui::LayerAnimationElement::CreatePauseElement( |
| 376 browser_pause_properties, | 385 browser_pause_properties, |
| 377 base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs))); | 386 base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs))); |
| 378 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation( | 387 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation( |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 586 // user has changed to during OOBE. | 595 // user has changed to during OOBE. |
| 587 if (!timezone_name.empty()) { | 596 if (!timezone_name.empty()) { |
| 588 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 597 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 589 icu::UnicodeString::fromUTF8(timezone_name)); | 598 icu::UnicodeString::fromUTF8(timezone_name)); |
| 590 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 599 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 591 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 600 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 592 } | 601 } |
| 593 } | 602 } |
| 594 | 603 |
| 595 } // namespace browser | 604 } // namespace browser |
| OLD | NEW |