Move VISUAL_STATE promise to activation
[chromium-blink-merge.git] / ui / chromeos / user_activity_power_manager_notifier.h
blob1f7babd283b57d3795c7411784063d0b2f08ab66
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
3 // found in the LICENSE file.
5 #ifndef UI_CHROMEOS_USER_ACTIVITY_POWER_MANAGER_NOTIFIER_H_
6 #define UI_CHROMEOS_USER_ACTIVITY_POWER_MANAGER_NOTIFIER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/time/time.h"
11 #include "ui/base/user_activity/user_activity_observer.h"
12 #include "ui/chromeos/ui_chromeos_export.h"
14 namespace ui {
16 class UserActivityDetector;
18 // Notifies the power manager when the user is active.
19 class UI_CHROMEOS_EXPORT UserActivityPowerManagerNotifier
20 : public UserActivityObserver {
21 public:
22 explicit UserActivityPowerManagerNotifier(UserActivityDetector* detector);
23 ~UserActivityPowerManagerNotifier() override;
25 // UserActivityObserver implementation.
26 void OnUserActivity(const Event* event) override;
28 private:
29 UserActivityDetector* detector_; // not owned
31 // Last time that the power manager was notified.
32 base::TimeTicks last_notify_time_;
34 DISALLOW_COPY_AND_ASSIGN(UserActivityPowerManagerNotifier);
37 } // namespace ui
39 #endif // UI_CHROMEOS_USER_ACTIVITY_POWER_MANAGER_NOTIFIER_H_