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

Unified Diff: ash/common/wm_shell.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/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index 8c12e583b2b2de2cc60bd7e239019ff946b7410f..14f78630e6815a12c441bedd7569b58305225d11 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -83,8 +83,8 @@ ShelfModel* WmShell::shelf_model() {
void WmShell::ShowContextMenu(const gfx::Point& location_in_screen,
ui::MenuSourceType source_type) {
// Bail if there is no active user session or if the screen is locked.
- if (GetSessionStateDelegate()->NumberOfLoggedInUsers() < 1 ||
- GetSessionStateDelegate()->IsScreenLocked()) {
+ if (session_controller()->NumberOfLoggedInUsers() < 1 ||
+ session_controller()->IsScreenLocked()) {
return;
}
@@ -94,9 +94,9 @@ void WmShell::ShowContextMenu(const gfx::Point& location_in_screen,
}
void WmShell::CreateShelfView() {
- // Must occur after SessionStateDelegate creation and user login.
- DCHECK(GetSessionStateDelegate());
- DCHECK_GT(GetSessionStateDelegate()->NumberOfLoggedInUsers(), 0);
+ // Must occur after SessionController creation and user login.
+ DCHECK(session_controller());
+ DCHECK_GT(session_controller()->NumberOfLoggedInUsers(), 0);
CreateShelfDelegate();
for (WmWindow* root_window : GetAllRootWindows())
@@ -107,11 +107,11 @@ void WmShell::CreateShelfDelegate() {
// May be called multiple times as shelves are created and destroyed.
if (shelf_delegate_)
return;
- // Must occur after SessionStateDelegate creation and user login because
+ // Must occur after SessionController creation and user login because
// Chrome's implementation of ShelfDelegate assumes it can get information
// about multi-profile login state.
- DCHECK(GetSessionStateDelegate());
- DCHECK_GT(GetSessionStateDelegate()->NumberOfLoggedInUsers(), 0);
+ DCHECK(session_controller());
+ DCHECK_GT(session_controller()->NumberOfLoggedInUsers(), 0);
shelf_delegate_.reset(
Shell::Get()->shell_delegate()->CreateShelfDelegate(shelf_model()));
shelf_window_watcher_.reset(new ShelfWindowWatcher(shelf_model()));
« no previous file with comments | « ash/common/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698