Index: ash/shelf/shelf_layout_manager.cc |
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc |
index 6e9e3c74e90ecb07295a7a9e350ced207c825f16..3f168e28fcfafe04e7dd7255de09008b151be741 100644 |
--- a/ash/shelf/shelf_layout_manager.cc |
+++ b/ash/shelf/shelf_layout_manager.cc |
@@ -12,9 +12,9 @@ |
#include "ash/launcher/launcher_types.h" |
#include "ash/root_window_controller.h" |
#include "ash/screen_ash.h" |
+#include "ash/session_state_delegate.h" |
#include "ash/shelf/shelf_widget.h" |
#include "ash/shell.h" |
-#include "ash/shell_delegate.h" |
#include "ash/shell_window_ids.h" |
#include "ash/system/status_area_widget.h" |
#include "ash/wm/property_util.h" |
@@ -272,8 +272,7 @@ ShelfLayoutManager::CalculateShelfVisibilityWhileDragging() { |
} |
void ShelfLayoutManager::UpdateVisibilityState() { |
- ShellDelegate* delegate = Shell::GetInstance()->delegate(); |
- if (delegate && delegate->IsScreenLocked()) { |
+ if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) { |
SetState(SHELF_VISIBLE); |
} else if (gesture_drag_status_ == GESTURE_DRAG_COMPLETE_IN_PROGRESS) { |
// TODO(zelidrag): Verify shelf drag animation still shows on the device |
@@ -514,11 +513,11 @@ ShelfLayoutManager::TargetBounds::TargetBounds() : opacity(0.0f) {} |
ShelfLayoutManager::TargetBounds::~TargetBounds() {} |
void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) { |
- ShellDelegate* delegate = Shell::GetInstance()->delegate(); |
State state; |
state.visibility_state = visibility_state; |
state.auto_hide_state = CalculateAutoHideState(visibility_state); |
- state.is_screen_locked = delegate && delegate->IsScreenLocked(); |
+ state.is_screen_locked = |
+ Shell::GetInstance()->session_state_delegate()->IsScreenLocked(); |
// It's possible for SetState() when a window becomes maximized but the state |
// won't have changed value. Do the dimming check before the early exit. |