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

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

Issue 2854055: Send UnlockCompleted signal even if screen lock is already present. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: browsertest fix Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker_browsertest.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698