base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
[chromium-blink-merge.git] / ui / wm / core / user_activity_observer.h
blob0fb35a61f06923a63fc848bd57c648329ced31fd
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_WM_CORE_USER_ACTIVITY_OBSERVER_H_
6 #define UI_WM_CORE_USER_ACTIVITY_OBSERVER_H_
8 #include "base/basictypes.h"
9 #include "ui/wm/wm_export.h"
11 namespace ui {
12 class Event;
15 namespace wm {
17 // Interface for classes that want to be notified about user activity.
18 // Implementations should register themselves with UserActivityDetector.
19 class WM_EXPORT UserActivityObserver {
20 public:
21 // Invoked periodically while the user is active (i.e. generating input
22 // events). |event| is the event that triggered the notification; it may
23 // be NULL in some cases (e.g. testing or synthetic invocations).
24 virtual void OnUserActivity(const ui::Event* event) = 0;
26 protected:
27 UserActivityObserver() {}
28 virtual ~UserActivityObserver() {}
30 DISALLOW_COPY_AND_ASSIGN(UserActivityObserver);
33 } // namespace wm
35 #endif // UI_WM_CORE_USER_ACTIVITY_OBSERVER_H_