OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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/session_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 |
| 16 #if defined(OS_CHROMEOS) |
| 17 #include "base/chromeos/chromeos_version.h" |
| 18 #endif |
| 19 |
| 20 namespace ash { |
| 21 |
| 22 const int SessionLockStateController::kLockTimeoutMs = 400; |
| 23 const int SessionLockStateController::kShutdownTimeoutMs = 400; |
| 24 const int SessionLockStateController::kLockFailTimeoutMs = 4000; |
| 25 const int SessionLockStateController::kLockToShutdownTimeoutMs = 150; |
| 26 const int SessionLockStateController::kShutdownRequestDelayMs = 50; |
| 27 |
| 28 SessionLockStateController::SessionLockStateController() |
| 29 : animator_(new internal::SessionStateAnimator()) { |
| 30 } |
| 31 |
| 32 SessionLockStateController::~SessionLockStateController() { |
| 33 } |
| 34 |
| 35 void SessionLockStateController::SetDelegate( |
| 36 SessionLockStateControllerDelegate* delegate) { |
| 37 delegate_.reset(delegate); |
| 38 } |
| 39 |
| 40 void SessionLockStateController::AddObserver( |
| 41 SessionLockStateObserver* observer) { |
| 42 observers_.AddObserver(observer); |
| 43 } |
| 44 |
| 45 void SessionLockStateController::RemoveObserver( |
| 46 SessionLockStateObserver* observer) { |
| 47 observers_.RemoveObserver(observer); |
| 48 } |
| 49 |
| 50 bool SessionLockStateController::HasObserver( |
| 51 SessionLockStateObserver* observer) { |
| 52 return observers_.HasObserver(observer); |
| 53 } |
| 54 |
| 55 |
| 56 } // namespace ash |
OLD | NEW |