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

Unified Diff: ash/shelf/shelf_locking_manager.cc

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ash/shelf/shelf_locking_manager.cc
diff --git a/ash/shelf/shelf_locking_manager.cc b/ash/shelf/shelf_locking_manager.cc
index 9c77b2ac11953887eb3bdbc2a310b49ad4cebd58..62f27e497a2d4d37cdac8100a2b010d53ccb78bb 100644
--- a/ash/shelf/shelf_locking_manager.cc
+++ b/ash/shelf/shelf_locking_manager.cc
@@ -15,7 +15,7 @@ namespace ash {
ShelfLockingManager::ShelfLockingManager(Shelf* shelf) : shelf_(shelf) {
Shell* shell = Shell::GetInstance();
shell->lock_state_controller()->AddObserver(this);
- SessionStateDelegate* delegate = shell->session_state_delegate();
+ SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
session_locked_ =
delegate->GetSessionState() != SessionStateDelegate::SESSION_STATE_ACTIVE;
screen_locked_ = delegate->IsScreenLocked();
@@ -24,9 +24,8 @@ ShelfLockingManager::ShelfLockingManager(Shelf* shelf) : shelf_(shelf) {
}
ShelfLockingManager::~ShelfLockingManager() {
- Shell* shell = Shell::GetInstance();
- shell->lock_state_controller()->RemoveObserver(this);
- shell->session_state_delegate()->RemoveSessionStateObserver(this);
+ Shell::GetInstance()->lock_state_controller()->RemoveObserver(this);
+ WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver(this);
WmShell::Get()->RemoveShellObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698