blob: b913b5f43385671a621563e31f4a239a816b1a21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
|