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

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

Issue 15974008: Rename SessionStateController -> LockStateController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
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/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 "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
11 #include "ash/desktop_background/desktop_background_controller.h" 11 #include "ash/desktop_background/desktop_background_controller.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/wm/session_state_controller.h" 13 #include "ash/wm/session_lock_state_controller.h"
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/message_loop.h" 18 #include "base/message_loop.h"
19 #include "base/metrics/histogram.h" 19 #include "base/metrics/histogram.h"
20 #include "base/string_util.h" 20 #include "base/string_util.h"
21 #include "base/timer.h" 21 #include "base/timer.h"
22 #include "base/utf_string_conversions.h" 22 #include "base/utf_string_conversions.h"
23 #include "chrome/browser/chromeos/login/authenticator.h" 23 #include "chrome/browser/chromeos/login/authenticator.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // For a guest/demo user, screen_locker_ would have never been initialized. 366 // For a guest/demo user, screen_locker_ would have never been initialized.
367 if (UserManager::Get()->IsLoggedInAsGuest() || 367 if (UserManager::Get()->IsLoggedInAsGuest() ||
368 UserManager::Get()->IsLoggedInAsDemoUser()) { 368 UserManager::Get()->IsLoggedInAsDemoUser()) {
369 VLOG(1) << "Refusing to hide lock screen for guest/demo account"; 369 VLOG(1) << "Refusing to hide lock screen for guest/demo account";
370 return; 370 return;
371 } 371 }
372 372
373 DCHECK(screen_locker_); 373 DCHECK(screen_locker_);
374 base::Callback<void(void)> callback = 374 base::Callback<void(void)> callback =
375 base::Bind(&ScreenLocker::ScheduleDeletion); 375 base::Bind(&ScreenLocker::ScheduleDeletion);
376 ash::Shell::GetInstance()->session_state_controller()-> 376 ash::Shell::GetInstance()->session_lock_state_controller()->
377 OnLockScreenHide(callback); 377 OnLockScreenHide(callback);
378 } 378 }
379 379
380 void ScreenLocker::ScheduleDeletion() { 380 void ScreenLocker::ScheduleDeletion() {
381 // Avoid possible multiple calls. 381 // Avoid possible multiple calls.
382 if (screen_locker_ == NULL) 382 if (screen_locker_ == NULL)
383 return; 383 return;
384 VLOG(1) << "Posting task to delete ScreenLocker " << screen_locker_; 384 VLOG(1) << "Posting task to delete ScreenLocker " << screen_locker_;
385 ScreenLocker* screen_locker = screen_locker_; 385 ScreenLocker* screen_locker = screen_locker_;
386 screen_locker_ = NULL; 386 screen_locker_ = NULL;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 content::Details<bool>(&state)); 442 content::Details<bool>(&state));
443 VLOG(1) << "Calling session manager's HandleLockScreenShown D-Bus method"; 443 VLOG(1) << "Calling session manager's HandleLockScreenShown D-Bus method";
444 DBusThreadManager::Get()->GetSessionManagerClient()->NotifyLockScreenShown(); 444 DBusThreadManager::Get()->GetSessionManagerClient()->NotifyLockScreenShown();
445 } 445 }
446 446
447 content::WebUI* ScreenLocker::GetAssociatedWebUI() { 447 content::WebUI* ScreenLocker::GetAssociatedWebUI() {
448 return delegate_->GetAssociatedWebUI(); 448 return delegate_->GetAssociatedWebUI();
449 } 449 }
450 450
451 } // namespace chromeos 451 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698