Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc

Issue 682183003: Make the kiosk code not depend on Ash in Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash42_accessibility
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698