| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/wm/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 chromeos::DBusThreadManager::Get() | 481 chromeos::DBusThreadManager::Get() |
| 482 ->GetSessionManagerClient() | 482 ->GetSessionManagerClient() |
| 483 ->RequestLockScreen(); | 483 ->RequestLockScreen(); |
| 484 #endif | 484 #endif |
| 485 } | 485 } |
| 486 | 486 |
| 487 base::TimeDelta timeout = | 487 base::TimeDelta timeout = |
| 488 base::TimeDelta::FromMilliseconds(kLockFailTimeoutMs); | 488 base::TimeDelta::FromMilliseconds(kLockFailTimeoutMs); |
| 489 #if defined(OS_CHROMEOS) | 489 #if defined(OS_CHROMEOS) |
| 490 // Increase lock timeout for slower hardware, see http://crbug.com/350628 | 490 // Increase lock timeout for slower hardware, see http://crbug.com/350628 |
| 491 const std::string board = base::SysInfo::GetLsbReleaseBoard(); | 491 // The devices with boards "x86-mario", "daisy", "x86-alex" and "x86-zgb" have |
| 492 if (board == "x86-mario" || | 492 // slower hardware. For "x86-alex" and "x86-zgb" there are some modifications |
| 493 // like "x86-alex-he". Also there's "daisy", "daisy_spring" and "daisy_skate", |
| 494 // but they are all different devices and only "daisy" has slower hardware. |
| 495 const std::string board = base::SysInfo::GetStrippedReleaseBoard(); |
| 496 if (board == "x86-mario" || board == "daisy" || |
| 493 base::StartsWith(board, "x86-alex", base::CompareCase::SENSITIVE) || | 497 base::StartsWith(board, "x86-alex", base::CompareCase::SENSITIVE) || |
| 494 base::StartsWith(board, "x86-zgb", base::CompareCase::SENSITIVE) || | 498 base::StartsWith(board, "x86-zgb", base::CompareCase::SENSITIVE)) { |
| 495 base::StartsWith(board, "daisy", base::CompareCase::SENSITIVE)) { | |
| 496 timeout *= 2; | 499 timeout *= 2; |
| 497 } | 500 } |
| 498 #endif | 501 #endif |
| 499 lock_fail_timer_.Start(FROM_HERE, timeout, this, | 502 lock_fail_timer_.Start(FROM_HERE, timeout, this, |
| 500 &LockStateController::OnLockFailTimeout); | 503 &LockStateController::OnLockFailTimeout); |
| 501 | 504 |
| 502 lock_duration_timer_.reset(new base::ElapsedTimer()); | 505 lock_duration_timer_.reset(new base::ElapsedTimer()); |
| 503 } | 506 } |
| 504 | 507 |
| 505 void LockStateController::PostLockAnimationFinished() { | 508 void LockStateController::PostLockAnimationFinished() { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 SessionStateAnimator::AnimationSpeed speed, | 566 SessionStateAnimator::AnimationSpeed speed, |
| 564 SessionStateAnimator::AnimationSequence* animation_sequence) { | 567 SessionStateAnimator::AnimationSequence* animation_sequence) { |
| 565 if (unlocked_properties_.get() && unlocked_properties_->wallpaper_is_hidden) { | 568 if (unlocked_properties_.get() && unlocked_properties_->wallpaper_is_hidden) { |
| 566 animation_sequence->StartAnimation(SessionStateAnimator::WALLPAPER, | 569 animation_sequence->StartAnimation(SessionStateAnimator::WALLPAPER, |
| 567 SessionStateAnimator::ANIMATION_FADE_OUT, | 570 SessionStateAnimator::ANIMATION_FADE_OUT, |
| 568 speed); | 571 speed); |
| 569 } | 572 } |
| 570 } | 573 } |
| 571 | 574 |
| 572 } // namespace ash | 575 } // namespace ash |
| OLD | NEW |