1// Copyright 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/wm/lock_state_controller.h"
6
7#include "ash/ash_switches.h"
8#include "ash/shell.h"
9#include "ash/shell_delegate.h"
10#include "ash/shell_window_ids.h"
11#include "ash/wm/session_state_animator.h"
12#include "base/command_line.h"
13#include "ui/aura/root_window.h"
14#include "ui/views/corewm/compound_event_filter.h"
15
16namespace ash {
17
18const int LockStateController::kLockTimeoutMs = 400;
19const int LockStateController::kShutdownTimeoutMs = 400;
20const int LockStateController::kLockFailTimeoutMs = 8000;
21const int LockStateController::kLockToShutdownTimeoutMs = 150;
22const int LockStateController::kShutdownRequestDelayMs = 50;
23
24LockStateController::LockStateController()
25    : animator_(new internal::SessionStateAnimator()) {
26}
27
28LockStateController::~LockStateController() {
29}
30
31void LockStateController::SetDelegate(LockStateControllerDelegate* delegate) {
32  delegate_.reset(delegate);
33}
34
35void LockStateController::AddObserver(LockStateObserver* observer) {
36  observers_.AddObserver(observer);
37}
38
39void LockStateController::RemoveObserver(LockStateObserver* observer) {
40  observers_.RemoveObserver(observer);
41}
42
43bool LockStateController::HasObserver(LockStateObserver* observer) {
44  return observers_.HasObserver(observer);
45}
46
47
48}  // namespace ash
49