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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 // user has changed to during OOBE. | 594 // user has changed to during OOBE. |
587 if (!timezone_name.empty()) { | 595 if (!timezone_name.empty()) { |
588 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 596 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
589 icu::UnicodeString::fromUTF8(timezone_name)); | 597 icu::UnicodeString::fromUTF8(timezone_name)); |
590 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 598 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
591 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 599 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
592 } | 600 } |
593 } | 601 } |
594 | 602 |
595 } // namespace browser | 603 } // namespace browser |
OLD | NEW |