Index: chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h |
diff --git a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7dbf3329092ea0cce7eb067e70da7c48d002d39b |
--- /dev/null |
+++ b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h |
@@ -0,0 +1,49 @@ |
+// 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_SCREENSAVER_H_ |
+#define CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_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 chromeos { |
+ |
+class KioskModeScreensaverObserver : public PowerManagerClient::Observer, |
+ public content::NotificationObserver { |
+ public: |
+ KioskModeScreensaverObserver(); |
+ |
+ // NotificationObserver overrides: |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ |
+ // PowerManagerClient::Observer overrides: |
+ virtual void IdleNotify(int64 threshold) OVERRIDE; |
+ virtual void ActiveNotify() OVERRIDE; |
+ |
+ private: |
+ friend class KioskModeScreensaverTest; |
+ content::NotificationRegistrar registrar_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(KioskModeScreensaverObserver); |
+}; |
+ |
+class KioskModeScreensaver { |
sky
2012/02/24 05:03:53
Why bother with an extra class here? Why not renam
rkc
2012/02/25 02:14:02
Done.
|
+ public: |
+ static void InitClass(); |
+ |
+ private: |
+ KioskModeScreensaver() {} |
+ |
+ DISALLOW_COPY_AND_ASSIGN(KioskModeScreensaver); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ |