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

Unified Diff: ash/shelf/shelf_layout_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_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 00f41d0e69d2878a8e157d41782cb82f878c7a84..7df78a3ce5cdf4f7743e1dcfeac6878a3283b571 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -224,7 +224,7 @@ ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf_widget)
}
Shell::GetInstance()->lock_state_controller()->AddObserver(this);
aura::client::GetActivationClient(root_window_)->AddObserver(this);
- Shell::GetInstance()->session_state_delegate()->AddSessionStateObserver(this);
+ WmShell::Get()->GetSessionStateDelegate()->AddSessionStateObserver(this);
}
ShelfLayoutManager::~ShelfLayoutManager() {
@@ -235,7 +235,7 @@ ShelfLayoutManager::~ShelfLayoutManager() {
WillDeleteShelfLayoutManager());
WmShell::Get()->RemoveShellObserver(this);
Shell::GetInstance()->lock_state_controller()->RemoveObserver(this);
- Shell::GetInstance()->session_state_delegate()->RemoveSessionStateObserver(
+ WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver(
this);
if (root_window_controller_observer_) {
WmWindowAura::Get(root_window_)
@@ -574,13 +574,10 @@ void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
keyboard_bounds_ = new_bounds;
OnWindowResized();
- SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
-
// On login screen if keyboard has been just hidden, update bounds just once
// but ignore target_bounds.work_area_insets since shelf overlaps with login
// window.
- if (session_state_delegate->IsUserSessionBlocked() &&
+ if (WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked() &&
keyboard_is_about_to_hide) {
Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, gfx::Insets());
}

Powered by Google App Engine
This is Rietveld 408576698