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 ASH_WM_USER_ACTIVITY_OBSERVER_H_ | 5 #ifndef ASH_WM_USER_ACTIVITY_OBSERVER_H_ |
6 #define ASH_WM_USER_ACTIVITY_OBSERVER_H_ | 6 #define ASH_WM_USER_ACTIVITY_OBSERVER_H_ |
7 #pragma once | |
8 | 7 |
9 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
10 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
11 | 10 |
12 namespace ash { | 11 namespace ash { |
13 | 12 |
14 // Interface for classes that want to be notified about user activity. | 13 // Interface for classes that want to be notified about user activity. |
15 // Implementations should register themselves with UserActivityDetector. | 14 // Implementations should register themselves with UserActivityDetector. |
16 class ASH_EXPORT UserActivityObserver { | 15 class ASH_EXPORT UserActivityObserver { |
17 public: | 16 public: |
18 // Invoked periodically while the user is active (i.e. generating input | 17 // Invoked periodically while the user is active (i.e. generating input |
19 // events). | 18 // events). |
20 virtual void OnUserActivity() = 0; | 19 virtual void OnUserActivity() = 0; |
21 | 20 |
22 protected: | 21 protected: |
23 UserActivityObserver() {} | 22 UserActivityObserver() {} |
24 virtual ~UserActivityObserver() {} | 23 virtual ~UserActivityObserver() {} |
25 | 24 |
26 DISALLOW_COPY_AND_ASSIGN(UserActivityObserver); | 25 DISALLOW_COPY_AND_ASSIGN(UserActivityObserver); |
27 }; | 26 }; |
28 | 27 |
29 } // namespace ash | 28 } // namespace ash |
30 | 29 |
31 #endif // ASH_WM_USER_ACTIVITY_OBSERVER_H_ | 30 #endif // ASH_WM_USER_ACTIVITY_OBSERVER_H_ |
OLD | NEW |