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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ 6 #define CHROME_BROWSER_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ 7 8 #include "ash/wm/user_activity_observer.h" 9 #include "base/basictypes.h" 10 #include "base/compiler_specific.h" 11 #include "base/time/time.h" 12 13 namespace chromeos { 14 15 // Notifies the power manager when the user is active. 16 class UserActivityNotifier : public ash::UserActivityObserver { 17 public: 18 UserActivityNotifier(); 19 virtual ~UserActivityNotifier(); 20 21 // ash::UserActivityObserver implementation. 22 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; 23 24 private: 25 // Last time that the power manager was notified. 26 base::TimeTicks last_notify_time_; 27 28 DISALLOW_COPY_AND_ASSIGN(UserActivityNotifier); 29 }; 30 31 } // namespace chromeos 32 33 #endif // CHROME_BROWSER_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_ 34