| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 ui::LayerAnimationElement::CreateTransformElement( | 296 ui::LayerAnimationElement::CreateTransformElement( |
| 297 ui::Transform(), | 297 ui::Transform(), |
| 298 base::TimeDelta::FromMilliseconds( | 298 base::TimeDelta::FromMilliseconds( |
| 299 kBackgroundTransitionDurationMs))); | 299 kBackgroundTransitionDurationMs))); |
| 300 scoped_ptr<ui::LayerAnimationSequence> background_transition( | 300 scoped_ptr<ui::LayerAnimationSequence> background_transition( |
| 301 new ui::LayerAnimationSequence( | 301 new ui::LayerAnimationSequence( |
| 302 background_transform_animation_initial.release())); | 302 background_transform_animation_initial.release())); |
| 303 background_transition->AddElement(background_pause.release()); | 303 background_transition->AddElement(background_pause.release()); |
| 304 background_transition->AddElement(background_transform_animation.release()); | 304 background_transition->AddElement(background_transform_animation.release()); |
| 305 ui::Layer* background_layer = | 305 ui::Layer* background_layer = |
| 306 aura_shell::Shell::GetInstance()->GetContainer( | 306 ash::Shell::GetInstance()->GetContainer( |
| 307 aura_shell::internal::kShellWindowId_DesktopBackgroundContainer)-> | 307 ash::internal::kShellWindowId_DesktopBackgroundContainer)-> |
| 308 layer(); | 308 layer(); |
| 309 background_layer->GetAnimator()->StartAnimation( | 309 background_layer->GetAnimator()->StartAnimation( |
| 310 background_transition.release()); | 310 background_transition.release()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 // Browser windows layer opacity animation. | 313 // Browser windows layer opacity animation. |
| 314 if (kEnableBrowserWindowsOpacityAnimation) { | 314 if (kEnableBrowserWindowsOpacityAnimation) { |
| 315 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation_initial( | 315 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation_initial( |
| 316 ui::LayerAnimationElement::CreateOpacityElement( | 316 ui::LayerAnimationElement::CreateOpacityElement( |
| 317 0.0f, | 317 0.0f, |
| 318 base::TimeDelta())); | 318 base::TimeDelta())); |
| 319 ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; | 319 ui::LayerAnimationElement::AnimatableProperties browser_pause_properties; |
| 320 browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); | 320 browser_pause_properties.insert(ui::LayerAnimationElement::OPACITY); |
| 321 scoped_ptr<ui::LayerAnimationElement> browser_pause_animation( | 321 scoped_ptr<ui::LayerAnimationElement> browser_pause_animation( |
| 322 ui::LayerAnimationElement::CreatePauseElement( | 322 ui::LayerAnimationElement::CreatePauseElement( |
| 323 browser_pause_properties, | 323 browser_pause_properties, |
| 324 base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs))); | 324 base::TimeDelta::FromMilliseconds(kBrowserTransitionPauseMs))); |
| 325 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation( | 325 scoped_ptr<ui::LayerAnimationElement> browser_opacity_animation( |
| 326 ui::LayerAnimationElement::CreateOpacityElement( | 326 ui::LayerAnimationElement::CreateOpacityElement( |
| 327 1.0f, | 327 1.0f, |
| 328 base::TimeDelta::FromMilliseconds(kBrowserTransitionDurationMs))); | 328 base::TimeDelta::FromMilliseconds(kBrowserTransitionDurationMs))); |
| 329 scoped_ptr<ui::LayerAnimationSequence> browser_transition( | 329 scoped_ptr<ui::LayerAnimationSequence> browser_transition( |
| 330 new ui::LayerAnimationSequence( | 330 new ui::LayerAnimationSequence( |
| 331 browser_opacity_animation_initial.release())); | 331 browser_opacity_animation_initial.release())); |
| 332 browser_transition->AddElement(browser_pause_animation.release()); | 332 browser_transition->AddElement(browser_pause_animation.release()); |
| 333 browser_transition->AddElement(browser_opacity_animation.release()); | 333 browser_transition->AddElement(browser_opacity_animation.release()); |
| 334 ui::Layer* default_container_layer = | 334 ui::Layer* default_container_layer = |
| 335 aura_shell::Shell::GetInstance()->GetContainer( | 335 ash::Shell::GetInstance()->GetContainer( |
| 336 aura_shell::internal::kShellWindowId_DefaultContainer)->layer(); | 336 ash::internal::kShellWindowId_DefaultContainer)->layer(); |
| 337 default_container_layer->GetAnimator()->StartAnimation( | 337 default_container_layer->GetAnimator()->StartAnimation( |
| 338 browser_transition.release()); | 338 browser_transition.release()); |
| 339 } | 339 } |
| 340 #endif | 340 #endif |
| 341 } | 341 } |
| 342 | 342 |
| 343 } // namespace chromeos | 343 } // namespace chromeos |
| 344 | 344 |
| 345 //////////////////////////////////////////////////////////////////////////////// | 345 //////////////////////////////////////////////////////////////////////////////// |
| 346 // browser::ShowLoginWizard implementation | 346 // browser::ShowLoginWizard implementation |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 // user has changed to during OOBE. | 477 // user has changed to during OOBE. |
| 478 if (!timezone_name.empty()) { | 478 if (!timezone_name.empty()) { |
| 479 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 479 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 480 icu::UnicodeString::fromUTF8(timezone_name)); | 480 icu::UnicodeString::fromUTF8(timezone_name)); |
| 481 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 481 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 482 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 482 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 483 } | 483 } |
| 484 } | 484 } |
| 485 | 485 |
| 486 } // namespace browser | 486 } // namespace browser |
| OLD | NEW |