| Index: chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h
|
| diff --git a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2a596139fce54fe9cc52cf8db1541314eaff0fc0
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_IDLE_LOGOUT_H_
|
| +#define CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_IDLE_LOGOUT_H_
|
| +#pragma once
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "chrome/browser/chromeos/dbus/power_manager_client.h"
|
| +#include "content/public/browser/notification_observer.h"
|
| +#include "content/public/browser/notification_registrar.h"
|
| +
|
| +namespace browser {
|
| +
|
| +// Shows or closes the logout dialog for Kiosk Mode.
|
| +void ShowIdleLogoutDialog();
|
| +void CloseIdleLogoutDialog();
|
| +
|
| +} // namespace browser
|
| +
|
| +namespace chromeos {
|
| +
|
| +class KioskModeIdleLogout : public PowerManagerClient::Observer,
|
| + public content::NotificationObserver {
|
| + public:
|
| + KioskModeIdleLogout();
|
| +
|
| + // Really initialize idle logout when KioskModeHelper is initialized.
|
| + void Setup();
|
| +
|
| + // NotificationObserver overrides:
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| + virtual void IdleNotify(int64 threshold) OVERRIDE;
|
| + virtual void ActiveNotify() OVERRIDE;
|
| +
|
| + private:
|
| + friend class KioskModeIdleLogoutTest;
|
| + content::NotificationRegistrar registrar_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(KioskModeIdleLogout);
|
| +};
|
| +
|
| +void InitializeKioskModeIdleLogout();
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_IDLE_LOGOUT_H_
|
|
|