| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 10 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
| 12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 class KioskModeScreensaver : public PowerManagerClient::Observer, | 16 class KioskModeScreensaver : public PowerManagerClient::Observer, |
| 17 public content::NotificationObserver { | 17 public content::NotificationObserver { |
| 18 public: | 18 public: |
| 19 KioskModeScreensaver(); | 19 KioskModeScreensaver(); |
| 20 virtual ~KioskModeScreensaver(); | 20 virtual ~KioskModeScreensaver(); |
| 21 | 21 |
| 22 // Really initialize screensaver when KioskModeHelper is initialized. |
| 23 void Setup(); |
| 24 |
| 22 // NotificationObserver overrides: | 25 // NotificationObserver overrides: |
| 23 virtual void Observe(int type, | 26 virtual void Observe(int type, |
| 24 const content::NotificationSource& source, | 27 const content::NotificationSource& source, |
| 25 const content::NotificationDetails& details) OVERRIDE; | 28 const content::NotificationDetails& details) OVERRIDE; |
| 26 | 29 |
| 27 // PowerManagerClient::Observer overrides: | 30 // PowerManagerClient::Observer overrides: |
| 28 virtual void IdleNotify(int64 threshold) OVERRIDE; | 31 virtual void IdleNotify(int64 threshold) OVERRIDE; |
| 29 virtual void ActiveNotify() OVERRIDE; | 32 virtual void ActiveNotify() OVERRIDE; |
| 30 | 33 |
| 31 private: | 34 private: |
| 32 friend class KioskModeScreensaverTest; | 35 friend class KioskModeScreensaverTest; |
| 33 content::NotificationRegistrar registrar_; | 36 content::NotificationRegistrar registrar_; |
| 34 | 37 |
| 35 DISALLOW_COPY_AND_ASSIGN(KioskModeScreensaver); | 38 DISALLOW_COPY_AND_ASSIGN(KioskModeScreensaver); |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 void InitializeKioskModeScreensaver(); | 41 void InitializeKioskModeScreensaver(); |
| 39 void ShutdownKioskModeScreensaver(); | 42 void ShutdownKioskModeScreensaver(); |
| 40 | 43 |
| 41 } // namespace chromeos | 44 } // namespace chromeos |
| 42 | 45 |
| 43 #endif // CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ | 46 #endif // CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ |
| OLD | NEW |