| Index: ash/common/shelf/shelf_locking_manager.cc
|
| diff --git a/ash/common/shelf/shelf_locking_manager.cc b/ash/common/shelf/shelf_locking_manager.cc
|
| index fa72ac1e045cb28a6f6a3b6597e1c24732dda65e..a897049466de0dbbf4ea90c4f40114219b95f09c 100644
|
| --- a/ash/common/shelf/shelf_locking_manager.cc
|
| +++ b/ash/common/shelf/shelf_locking_manager.cc
|
| @@ -4,26 +4,28 @@
|
|
|
| #include "ash/common/shelf/shelf_locking_manager.h"
|
|
|
| -#include "ash/common/session/session_state_delegate.h"
|
| +#include "ash/common/session/session_controller.h"
|
| #include "ash/common/shelf/wm_shelf.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/shell.h"
|
|
|
| namespace ash {
|
|
|
| -ShelfLockingManager::ShelfLockingManager(WmShelf* shelf) : shelf_(shelf) {
|
| +ShelfLockingManager::ShelfLockingManager(WmShelf* shelf)
|
| + : shelf_(shelf), stored_alignment_(shelf->GetAlignment()) {
|
| + DCHECK(shelf_);
|
| WmShell::Get()->AddLockStateObserver(this);
|
| - SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
|
| + SessionController* controller = WmShell::Get()->session_controller();
|
| session_locked_ =
|
| - delegate->GetSessionState() != session_manager::SessionState::ACTIVE;
|
| - screen_locked_ = delegate->IsScreenLocked();
|
| - delegate->AddSessionStateObserver(this);
|
| + controller->GetSessionState() != session_manager::SessionState::ACTIVE;
|
| + screen_locked_ = controller->IsScreenLocked();
|
| + controller->AddSessionStateObserver(this);
|
| Shell::GetInstance()->AddShellObserver(this);
|
| }
|
|
|
| ShelfLockingManager::~ShelfLockingManager() {
|
| WmShell::Get()->RemoveLockStateObserver(this);
|
| - WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver(this);
|
| + WmShell::Get()->session_controller()->RemoveSessionStateObserver(this);
|
| Shell::GetInstance()->RemoveShellObserver(this);
|
| }
|
|
|
|
|