summaryrefslogtreecommitdiffstats
path: root/ash/shelf/shelf_layout_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/shelf/shelf_layout_manager.cc')
-rw-r--r--ash/shelf/shelf_layout_manager.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 6e9e3c7..3f168e2 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.