| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); | 582 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); |
| 583 // TODO(oshima): Currently, PowerManager may send a lock screen event | 583 // TODO(oshima): Currently, PowerManager may send a lock screen event |
| 584 // even if a screen is locked. Investigate & solve the issue and | 584 // even if a screen is locked. Investigate & solve the issue and |
| 585 // enable this again if it's possible. | 585 // enable this again if it's possible. |
| 586 // DCHECK(!screen_locker_); | 586 // DCHECK(!screen_locker_); |
| 587 if (!screen_locker_) { | 587 if (!screen_locker_) { |
| 588 ScreenLocker* locker = | 588 ScreenLocker* locker = |
| 589 new ScreenLocker(UserManager::Get()->logged_in_user()); | 589 new ScreenLocker(UserManager::Get()->logged_in_user()); |
| 590 locker->Init(); | 590 locker->Init(); |
| 591 } else { | 591 } else { |
| 592 LOG(INFO) << "Show(): screen locker already exists. ignoring"; | 592 LOG(INFO) << "Show(): screen locker already exists. " |
| 593 << "just sending completion event"; |
| 594 if (CrosLibrary::Get()->EnsureLoaded()) |
| 595 CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenLockCompleted(); |
| 593 } | 596 } |
| 594 } | 597 } |
| 595 | 598 |
| 596 // static | 599 // static |
| 597 void ScreenLocker::Hide() { | 600 void ScreenLocker::Hide() { |
| 598 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); | 601 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); |
| 599 DCHECK(screen_locker_); | 602 DCHECK(screen_locker_); |
| 600 LOG(INFO) << "Hide Screen Locker:" << screen_locker_; | 603 LOG(INFO) << "Hide Screen Locker:" << screen_locker_; |
| 601 MessageLoopForUI::current()->DeleteSoon(FROM_HERE, screen_locker_); | 604 MessageLoopForUI::current()->DeleteSoon(FROM_HERE, screen_locker_); |
| 602 } | 605 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 } | 676 } |
| 674 | 677 |
| 675 void ScreenLocker::OnWindowManagerReady() { | 678 void ScreenLocker::OnWindowManagerReady() { |
| 676 DLOG(INFO) << "OnClientEvent: drawn for lock"; | 679 DLOG(INFO) << "OnClientEvent: drawn for lock"; |
| 677 drawn_ = true; | 680 drawn_ = true; |
| 678 if (input_grabbed_) | 681 if (input_grabbed_) |
| 679 ScreenLockReady(); | 682 ScreenLockReady(); |
| 680 } | 683 } |
| 681 | 684 |
| 682 } // namespace chromeos | 685 } // namespace chromeos |
| OLD | NEW |