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

Side by Side Diff: chrome/browser/chromeos/power/login_lock_state_notifier.cc

Issue 2761063002: Move more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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
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/power/login_lock_state_notifier.h" 5 #include "chrome/browser/chromeos/power/login_lock_state_notifier.h"
6 6
7 #include "ash/common/login_status.h" 7 #include "ash/common/login_status.h"
8 #include "ash/common/system/tray/system_tray_delegate.h" 8 #include "ash/common/system/tray/system_tray_delegate.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
13 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 13 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
14 #include "content/public/browser/notification_service.h" 14 #include "content/public/browser/notification_service.h"
15 15
16 namespace ash { 16 namespace ash {
17 class LockStateControllerDelegate; 17 class LockStateControllerDelegate;
18 } 18 }
19 19
20 namespace chromeos { 20 namespace chromeos {
21 21
22 namespace { 22 namespace {
23 23
24 ash::LoginStatus GetCurrentLoginStatus() { 24 ash::LoginStatus GetCurrentLoginStatus() {
25 if (ash::WmShell::Get()->system_tray_delegate()) 25 if (ash::Shell::Get()->system_tray_delegate())
26 return ash::WmShell::Get()->system_tray_delegate()->GetUserLoginStatus(); 26 return ash::Shell::Get()->system_tray_delegate()->GetUserLoginStatus();
27 27
28 return ash::LoginStatus::NOT_LOGGED_IN; 28 return ash::LoginStatus::NOT_LOGGED_IN;
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 32
33 LoginLockStateNotifier::LoginLockStateNotifier() { 33 LoginLockStateNotifier::LoginLockStateNotifier() {
34 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED, 34 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED,
35 content::NotificationService::AllSources()); 35 content::NotificationService::AllSources());
36 registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING, 36 registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
(...skipping 27 matching lines...) Expand all
64 bool locked = *content::Details<bool>(details).ptr(); 64 bool locked = *content::Details<bool>(details).ptr();
65 ash::Shell::GetInstance()->OnLockStateChanged(locked); 65 ash::Shell::GetInstance()->OnLockStateChanged(locked);
66 break; 66 break;
67 } 67 }
68 default: 68 default:
69 NOTREACHED() << "Unexpected notification " << type; 69 NOTREACHED() << "Unexpected notification " << type;
70 } 70 }
71 } 71 }
72 72
73 } // namespace chromeos 73 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698