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

Unified Diff: trunk/src/ash/accelerators/accelerator_controller.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 | « no previous file | trunk/src/ash/accelerators/nested_dispatcher_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/accelerators/accelerator_controller.cc
===================================================================
--- trunk/src/ash/accelerators/accelerator_controller.cc (revision 194588)
+++ trunk/src/ash/accelerators/accelerator_controller.cc (working copy)
@@ -26,7 +26,6 @@
#include "ash/root_window_controller.h"
#include "ash/rotator/screen_rotation.h"
#include "ash/screenshot_delegate.h"
-#include "ash/session_state_delegate.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
@@ -102,7 +101,7 @@
#if defined(OS_CHROMEOS)
bool HandleLock() {
- Shell::GetInstance()->session_state_delegate()->LockScreen();
+ Shell::GetInstance()->delegate()->LockScreen();
return true;
}
@@ -428,12 +427,16 @@
bool AcceleratorController::PerformAction(int action,
const ui::Accelerator& accelerator) {
ash::Shell* shell = ash::Shell::GetInstance();
- if (!shell->session_state_delegate()->IsActiveUserSessionStarted() &&
+ bool at_login_screen = false;
+#if defined(OS_CHROMEOS)
+ at_login_screen = !shell->delegate()->IsSessionStarted();
+#endif
+ if (at_login_screen &&
actions_allowed_at_login_screen_.find(action) ==
actions_allowed_at_login_screen_.end()) {
return false;
}
- if (shell->session_state_delegate()->IsScreenLocked() &&
+ if (shell->IsScreenLocked() &&
actions_allowed_at_lock_screen_.find(action) ==
actions_allowed_at_lock_screen_.end()) {
return false;
« no previous file with comments | « no previous file | trunk/src/ash/accelerators/nested_dispatcher_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698