Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Side by Side Diff: chrome/browser/chromeos/login/base_login_display_host.cc

Issue 9107068: Don't animate the default/background layer if there is no background. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698