| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void OnIdle(); | 35 void OnIdle(); |
| 36 void OnOobeTimerUpdate(); | 36 void OnOobeTimerUpdate(); |
| 37 void SetupTimeouts(); | 37 void SetupTimeouts(); |
| 38 bool IsDerelict(); | 38 bool IsDerelict(); |
| 39 | 39 |
| 40 // Total time this machine has spent on OOBE. | 40 // Total time this machine has spent on OOBE. |
| 41 base::TimeDelta time_on_oobe_; | 41 base::TimeDelta time_on_oobe_; |
| 42 | 42 |
| 43 scoped_ptr<IdleDetector> idle_detector_; | 43 scoped_ptr<IdleDetector> idle_detector_; |
| 44 | 44 |
| 45 base::RepeatingTimer<DemoModeDetector> oobe_timer_; | 45 base::RepeatingTimer oobe_timer_; |
| 46 | 46 |
| 47 // Timeout to detect if the machine is in a derelict state. | 47 // Timeout to detect if the machine is in a derelict state. |
| 48 base::TimeDelta derelict_detection_timeout_; | 48 base::TimeDelta derelict_detection_timeout_; |
| 49 | 49 |
| 50 // Timeout before showing our demo app if the machine is in a derelict state. | 50 // Timeout before showing our demo app if the machine is in a derelict state. |
| 51 base::TimeDelta derelict_idle_timeout_; | 51 base::TimeDelta derelict_idle_timeout_; |
| 52 | 52 |
| 53 // Time between updating our total time on oobe. | 53 // Time between updating our total time on oobe. |
| 54 base::TimeDelta oobe_timer_update_interval_; | 54 base::TimeDelta oobe_timer_update_interval_; |
| 55 | 55 |
| 56 bool demo_launched_; | 56 bool demo_launched_; |
| 57 | 57 |
| 58 base::WeakPtrFactory<DemoModeDetector> weak_ptr_factory_; | 58 base::WeakPtrFactory<DemoModeDetector> weak_ptr_factory_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(DemoModeDetector); | 60 DISALLOW_COPY_AND_ASSIGN(DemoModeDetector); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace chromeos | 63 } // namespace chromeos |
| 64 | 64 |
| 65 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ | 65 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ |
| OLD | NEW |