Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 7b809cb0f826ca6e76cfd9f135549ea51f5c7986..9356cfc05611695753a167f654f27729ed3c7d58 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -28,6 +28,7 @@ |
#include "ash/magnifier/partial_magnification_controller.h" |
#include "ash/root_window_controller.h" |
#include "ash/screen_ash.h" |
+#include "ash/session_state_delegate.h" |
#include "ash/shelf/shelf_layout_manager.h" |
#include "ash/shelf/shelf_widget.h" |
#include "ash/shell_delegate.h" |
@@ -559,6 +560,8 @@ void Shell::Init() { |
// StatusAreaWidget uses Shell's CapsLockDelegate. |
caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate()); |
+ session_state_delegate_.reset(delegate_->CreateSessionStateDelegate()); |
+ |
if (!command_line->HasSwitch(views::corewm::switches::kNoDropShadows)) { |
resize_shadow_controller_.reset(new internal::ResizeShadowController()); |
shadow_controller_.reset( |
@@ -602,11 +605,11 @@ void Shell::Init() { |
} |
void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { |
- // No context menus if user have not logged in. |
- if (!delegate_->IsUserLoggedIn()) |
+ // No context menus if there is no session with an active user. |
+ if (!session_state_delegate_->HasActiveUser()) |
return; |
// No context menus when screen is locked. |
- if (IsScreenLocked()) |
+ if (session_state_delegate_->IsScreenLocked()) |
return; |
aura::RootWindow* root = |
@@ -640,14 +643,6 @@ aura::Window* Shell::GetAppListWindow() { |
return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; |
} |
-bool Shell::CanLockScreen() { |
- return delegate_->CanLockScreen(); |
-} |
- |
-bool Shell::IsScreenLocked() const { |
- return delegate_->IsScreenLocked(); |
-} |
- |
bool Shell::IsSystemModalWindowOpen() const { |
if (simulate_modal_window_open_for_testing_) |
return true; |