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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/session_state_delegate_stub.h"
6
7 #include "ash/shell.h"
8 #include "ash/shell/example_factory.h"
9
10 namespace ash {
11
12 SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) {
13 }
14
15 SessionStateDelegateStub::~SessionStateDelegateStub() {
16 }
17
18 bool SessionStateDelegateStub::HasActiveUser() const {
19 return true;
20 }
21
22 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const {
23 return true;
24 }
25
26 bool SessionStateDelegateStub::CanLockScreen() const {
27 return true;
28 }
29
30 bool SessionStateDelegateStub::IsScreenLocked() const {
31 return screen_locked_;
32 }
33
34 void SessionStateDelegateStub::LockScreen() {
35 shell::CreateLockScreen();
36 screen_locked_ = true;
37 Shell::GetInstance()->UpdateShelfVisibility();
38 }
39
40 void SessionStateDelegateStub::UnlockScreen() {
41 screen_locked_ = false;
42 Shell::GetInstance()->UpdateShelfVisibility();
43 }
44
45 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698