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

Unified Diff: trunk/src/ash/shelf/shelf_layout_manager.cc

Issue 14200034: Revert 194578 "Add ash SessionStateDelegate" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/ash/session_state_delegate_stub.cc ('k') | trunk/src/ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/shelf/shelf_layout_manager.cc
===================================================================
--- trunk/src/ash/shelf/shelf_layout_manager.cc (revision 194588)
+++ trunk/src/ash/shelf/shelf_layout_manager.cc (working copy)
@@ -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,7 +272,8 @@
}
void ShelfLayoutManager::UpdateVisibilityState() {
- if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) {
+ ShellDelegate* delegate = Shell::GetInstance()->delegate();
+ if (delegate && 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
@@ -513,11 +514,11 @@
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 =
- Shell::GetInstance()->session_state_delegate()->IsScreenLocked();
+ state.is_screen_locked = delegate && 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.
« no previous file with comments | « trunk/src/ash/session_state_delegate_stub.cc ('k') | trunk/src/ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698