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..b33c713d1182a6af72f1e4acec5715e502969ee8 100644 |
--- a/ash/common/shelf/shelf_locking_manager.cc |
+++ b/ash/common/shelf/shelf_locking_manager.cc |
@@ -4,26 +4,27 @@ |
#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()) { |
xiyuan
2017/03/17 07:08:15
Initialize |stored_alignment_| with the current al
James Cook
2017/03/17 17:14:35
msw, can you look at this piece of the CL? I think
msw
2017/03/17 18:10:46
This small part of the change lgtm (with James' su
xiyuan
2017/03/17 22:52:02
Removed initialization from header and added DCHEC
|
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); |
} |