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

Unified Diff: trunk/src/ash/shell.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/shell.h ('k') | trunk/src/ash/shell/app_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/shell.cc
===================================================================
--- trunk/src/ash/shell.cc (revision 194588)
+++ trunk/src/ash/shell.cc (working copy)
@@ -28,7 +28,6 @@
#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"
@@ -560,8 +559,6 @@
// 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(
@@ -605,11 +602,11 @@
}
void Shell::ShowContextMenu(const gfx::Point& location_in_screen) {
- // No context menus if there is no session with an active user.
- if (!session_state_delegate_->HasActiveUser())
+ // No context menus if user have not logged in.
+ if (!delegate_->IsUserLoggedIn())
return;
// No context menus when screen is locked.
- if (session_state_delegate_->IsScreenLocked())
+ if (IsScreenLocked())
return;
aura::RootWindow* root =
@@ -643,6 +640,14 @@
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;
« no previous file with comments | « trunk/src/ash/shell.h ('k') | trunk/src/ash/shell/app_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698