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

Unified Diff: ash/session_state_delegate_stub.cc

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. 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
Index: ash/session_state_delegate_stub.cc
diff --git a/ash/session_state_delegate_stub.cc b/ash/session_state_delegate_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b913b5f43385671a621563e31f4a239a816b1a21
--- /dev/null
+++ b/ash/session_state_delegate_stub.cc
@@ -0,0 +1,45 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/session_state_delegate_stub.h"
+
+#include "ash/shell.h"
+#include "ash/shell/example_factory.h"
+
+namespace ash {
+
+SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) {
+}
+
+SessionStateDelegateStub::~SessionStateDelegateStub() {
+}
+
+bool SessionStateDelegateStub::HasActiveUser() const {
+ return true;
+}
+
+bool SessionStateDelegateStub::IsActiveUserSessionStarted() const {
+ return true;
+}
+
+bool SessionStateDelegateStub::CanLockScreen() const {
+ return true;
+}
+
+bool SessionStateDelegateStub::IsScreenLocked() const {
+ return screen_locked_;
+}
+
+void SessionStateDelegateStub::LockScreen() {
+ shell::CreateLockScreen();
+ screen_locked_ = true;
+ Shell::GetInstance()->UpdateShelfVisibility();
+}
+
+void SessionStateDelegateStub::UnlockScreen() {
+ screen_locked_ = false;
+ Shell::GetInstance()->UpdateShelfVisibility();
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698