| 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_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 SessionStateController::kLockTimeoutMs = 400; | |
| 23 const int SessionStateController::kShutdownTimeoutMs = 400; | |
| 24 const int SessionStateController::kLockFailTimeoutMs = 4000; | |
| 25 const int SessionStateController::kLockToShutdownTimeoutMs = 150; | |
| 26 const int SessionStateController::kShutdownRequestDelayMs = 50; | |
| 27 | |
| 28 SessionStateController::SessionStateController() | |
| 29 : animator_(new internal::SessionStateAnimator()) { | |
| 30 } | |
| 31 | |
| 32 SessionStateController::~SessionStateController() { | |
| 33 } | |
| 34 | |
| 35 void SessionStateController::SetDelegate( | |
| 36 SessionStateControllerDelegate* delegate) { | |
| 37 delegate_.reset(delegate); | |
| 38 } | |
| 39 | |
| 40 void SessionStateController::AddObserver(SessionStateObserver* observer) { | |
| 41 observers_.AddObserver(observer); | |
| 42 } | |
| 43 | |
| 44 void SessionStateController::RemoveObserver(SessionStateObserver* observer) { | |
| 45 observers_.RemoveObserver(observer); | |
| 46 } | |
| 47 | |
| 48 bool SessionStateController::HasObserver(SessionStateObserver* observer) { | |
| 49 return observers_.HasObserver(observer); | |
| 50 } | |
| 51 | |
| 52 | |
| 53 } // namespace ash | |
| OLD | NEW |