Chromium Code Reviews| Index: ui/wm/core/user_activity_detector.h |
| diff --git a/ui/wm/core/user_activity_detector.h b/ui/wm/core/user_activity_detector.h |
| index 0b92bc3b7c38c9888451a5675f33d56debfc909b..611bb8b1805bced740c8b5c1d6a5791ca845faa6 100644 |
| --- a/ui/wm/core/user_activity_detector.h |
| +++ b/ui/wm/core/user_activity_detector.h |
| @@ -26,8 +26,14 @@ class WM_EXPORT UserActivityDetector : public ui::EventHandler { |
| // is received that displays' power states are being changed. |
| static const int kDisplayPowerChangeIgnoreMouseMs; |
| - UserActivityDetector(); |
| - ~UserActivityDetector() override; |
| + // Creates a UserActivityDetector instance. |
| + static void Create(); |
| + |
| + // Deletes the UserActivityDetector instance. |
| + static void Shutdown(); |
|
oshima
2014/10/31 16:53:31
Can you keep ctor/dtor, and creation in shell. Jus
pkotwicz
2014/10/31 16:58:29
For the sake of interest, which other classes have
|
| + |
| + // Returns the UserActivityDetector instance if one was created. |
| + static UserActivityDetector* Get(); |
| base::TimeTicks last_activity_time() const { return last_activity_time_; } |
| @@ -48,6 +54,9 @@ class WM_EXPORT UserActivityDetector : public ui::EventHandler { |
| void OnGestureEvent(ui::GestureEvent* event) override; |
| private: |
| + UserActivityDetector(); |
| + ~UserActivityDetector() override; |
| + |
| // Returns |now_for_test_| if set or base::TimeTicks::Now() otherwise. |
| base::TimeTicks GetCurrentTime() const; |