If a RemoteFrame asks to navigate, send an OpenURL IPC
[chromium-blink-merge.git] / ui / chromeos / user_activity_power_manager_notifier.h
blob483f1b51e2519e42ef587eed9e3b90d3edeb376d
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/chromeos/ui_chromeos_export.h"
12 #include "ui/wm/core/user_activity_observer.h"
14 namespace wm {
15 class UserActivityDetector;
16 } // namespace wm
18 namespace ui {
20 // Notifies the power manager when the user is active.
21 class UI_CHROMEOS_EXPORT UserActivityPowerManagerNotifier
22 : public ::wm::UserActivityObserver {
23 public:
24 explicit UserActivityPowerManagerNotifier(
25 ::wm::UserActivityDetector* detector);
26 virtual ~UserActivityPowerManagerNotifier();
28 // UserActivityObserver implementation.
29 virtual void OnUserActivity(const Event* event) OVERRIDE;
31 private:
32 ::wm::UserActivityDetector* detector_; // not owned
34 // Last time that the power manager was notified.
35 base::TimeTicks last_notify_time_;
37 DISALLOW_COPY_AND_ASSIGN(UserActivityPowerManagerNotifier);
40 } // namespace ui
42 #endif // UI_CHROMEOS_USER_ACTIVITY_POWER_MANAGER_NOTIFIER_H_