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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "ui/wm/core/user_activity_observer.h" | 11 #include "ui/wm/core/user_activity_observer.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 class Extension; | 14 class Extension; |
15 } | 15 } |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 class KioskModeScreensaver : public wm::UserActivityObserver { | 19 class KioskModeScreensaver : public wm::UserActivityObserver { |
20 public: | 20 public: |
21 KioskModeScreensaver(); | 21 KioskModeScreensaver(); |
22 virtual ~KioskModeScreensaver(); | 22 virtual ~KioskModeScreensaver(); |
23 | 23 |
24 private: | 24 private: |
25 friend class KioskModeScreensaverTest; | 25 friend class KioskModeScreensaverTest; |
26 | 26 |
27 // wm::UserActivityObserver overrides: | 27 // wm::UserActivityObserver overrides: |
28 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; | 28 virtual void OnUserActivity(const ui::Event* event) override; |
29 | 29 |
30 // Initialization functions, in order | 30 // Initialization functions, in order |
31 // Get the screensaver path once KioskModeHelper is initialized. | 31 // Get the screensaver path once KioskModeHelper is initialized. |
32 void GetScreensaverCrxPath(); | 32 void GetScreensaverCrxPath(); |
33 | 33 |
34 // Callback to receive the path to the screensaver extension's crx and call | 34 // Callback to receive the path to the screensaver extension's crx and call |
35 // the unpacker to unpack and load the crx. | 35 // the unpacker to unpack and load the crx. |
36 void ScreensaverPathCallback(const base::FilePath& screensaver_crx); | 36 void ScreensaverPathCallback(const base::FilePath& screensaver_crx); |
37 | 37 |
38 // Called back on the UI thread to Setup the screensaver with the now unpacked | 38 // Called back on the UI thread to Setup the screensaver with the now unpacked |
39 // and loaded extension. | 39 // and loaded extension. |
40 void SetupScreensaver(scoped_refptr<extensions::Extension> extension, | 40 void SetupScreensaver(scoped_refptr<extensions::Extension> extension, |
41 const base::FilePath& extension_base_path); | 41 const base::FilePath& extension_base_path); |
42 | 42 |
43 base::FilePath extension_base_path_; | 43 base::FilePath extension_base_path_; |
44 | 44 |
45 base::WeakPtrFactory<KioskModeScreensaver> weak_ptr_factory_; | 45 base::WeakPtrFactory<KioskModeScreensaver> weak_ptr_factory_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(KioskModeScreensaver); | 47 DISALLOW_COPY_AND_ASSIGN(KioskModeScreensaver); |
48 }; | 48 }; |
49 | 49 |
50 void InitializeKioskModeScreensaver(); | 50 void InitializeKioskModeScreensaver(); |
51 void ShutdownKioskModeScreensaver(); | 51 void ShutdownKioskModeScreensaver(); |
52 | 52 |
53 } // namespace chromeos | 53 } // namespace chromeos |
54 | 54 |
55 #endif // CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_KIOSK_MODE_KIOSK_MODE_SCREENSAVER_H_ |
OLD | NEW |