OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ |
6 #define ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ |
7 | 7 |
8 #include "ash/wm/user_activity_observer.h" | |
9 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
11 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "ui/wm/core/user_activity_observer.h" | |
12 | |
13 namespace wm { | |
14 class UserActivityDetector; | |
15 } // namespace wm | |
12 | 16 |
13 namespace ash { | 17 namespace ash { |
14 | |
15 class UserActivityDetector; | |
16 | |
17 namespace internal { | 18 namespace internal { |
18 | 19 |
19 // Notifies the power manager when the user is active. | 20 // Notifies the power manager when the user is active. |
20 class UserActivityNotifier : public UserActivityObserver { | 21 class UserActivityNotifier : public ::wm::UserActivityObserver { |
Daniel Erat
2014/04/02 16:03:22
i think that app_shell will want to use this class
sky
2014/04/02 17:57:12
I don't think we want chromeos specific code in ui
| |
21 public: | 22 public: |
22 explicit UserActivityNotifier(UserActivityDetector* detector); | 23 explicit UserActivityNotifier(::wm::UserActivityDetector* detector); |
23 virtual ~UserActivityNotifier(); | 24 virtual ~UserActivityNotifier(); |
24 | 25 |
25 // UserActivityObserver implementation. | 26 // UserActivityObserver implementation. |
26 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; | 27 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; |
27 | 28 |
28 private: | 29 private: |
29 UserActivityDetector* detector_; // not owned | 30 ::wm::UserActivityDetector* detector_; // not owned |
30 | 31 |
31 // Last time that the power manager was notified. | 32 // Last time that the power manager was notified. |
32 base::TimeTicks last_notify_time_; | 33 base::TimeTicks last_notify_time_; |
33 | 34 |
34 DISALLOW_COPY_AND_ASSIGN(UserActivityNotifier); | 35 DISALLOW_COPY_AND_ASSIGN(UserActivityNotifier); |
35 }; | 36 }; |
36 | 37 |
37 } // namespace internal | 38 } // namespace internal |
38 } // namespace ash | 39 } // namespace ash |
39 | 40 |
40 #endif // ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ | 41 #endif // ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ |
OLD | NEW |