Chromium Code Reviews| Index: chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc |
| diff --git a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc |
| index 1c2c24136e9ca5167172992cdf50fe99b95699bb..f6cfad99288eec97a14eaa8e82f705a1ba539f02 100644 |
| --- a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc |
| +++ b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc |
| @@ -4,7 +4,6 @@ |
| #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" |
| -#include "ash/shell.h" |
| #include "base/bind.h" |
| #include "base/lazy_instance.h" |
| #include "base/logging.h" |
| @@ -18,6 +17,10 @@ |
| #include "content/public/browser/notification_service.h" |
| #include "ui/wm/core/user_activity_detector.h" |
| +#if defined(USE_ASH) |
|
Jun Mukai
2014/10/29 01:03:27
IIRC Athena still links to ash right now, so this
|
| +#include "ash/shell.h" |
| +#endif |
| + |
| namespace chromeos { |
| namespace { |
| @@ -42,9 +45,11 @@ KioskModeIdleLogout::KioskModeIdleLogout() { |
| } |
| KioskModeIdleLogout::~KioskModeIdleLogout() { |
| +#if defined(USE_ASH) |
| if (ash::Shell::HasInstance() && |
| ash::Shell::GetInstance()->user_activity_detector()->HasObserver(this)) |
| ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this); |
| +#endif |
| } |
| void KioskModeIdleLogout::Setup() { |
| @@ -74,8 +79,10 @@ void KioskModeIdleLogout::OnUserActivity(const ui::Event* event) { |
| } |
| void KioskModeIdleLogout::Start() { |
| +#if defined(USE_ASH) |
| if (!ash::Shell::GetInstance()->user_activity_detector()->HasObserver(this)) |
| ash::Shell::GetInstance()->user_activity_detector()->AddObserver(this); |
| +#endif |
| ResetTimer(); |
| } |