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

Unified Diff: ash/common/shelf/shelf_locking_manager.cc

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase to get WorkspaceLayoutManagerSoloTest change 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/shelf/shelf_locking_manager.h ('k') | ash/common/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « ash/common/shelf/shelf_locking_manager.h ('k') | ash/common/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698