Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: ui/base/user_activity/user_activity_detector.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/models/tree_node_model.h ('k') | ui/chromeos/ime/candidate_window_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_ 5 #ifndef UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_
6 #define UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_ 6 #define UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 base::TimeTicks GetCurrentTime() const; 55 base::TimeTicks GetCurrentTime() const;
56 56
57 // Processes the event after it has been converted from a PlatformEvent. 57 // Processes the event after it has been converted from a PlatformEvent.
58 void ProcessReceivedEvent(const ui::Event* event); 58 void ProcessReceivedEvent(const ui::Event* event);
59 59
60 // Updates |last_activity_time_|. Additionally notifies observers and 60 // Updates |last_activity_time_|. Additionally notifies observers and
61 // updates |last_observer_notification_time_| if enough time has passed 61 // updates |last_observer_notification_time_| if enough time has passed
62 // since the last notification. 62 // since the last notification.
63 void HandleActivity(const ui::Event* event); 63 void HandleActivity(const ui::Event* event);
64 64
65 ObserverList<UserActivityObserver> observers_; 65 base::ObserverList<UserActivityObserver> observers_;
66 66
67 // Last time at which user activity was observed. 67 // Last time at which user activity was observed.
68 base::TimeTicks last_activity_time_; 68 base::TimeTicks last_activity_time_;
69 69
70 // Last time at which we notified observers that the user was active. 70 // Last time at which we notified observers that the user was active.
71 base::TimeTicks last_observer_notification_time_; 71 base::TimeTicks last_observer_notification_time_;
72 72
73 // If set, used when the current time is needed. This can be set by tests to 73 // If set, used when the current time is needed. This can be set by tests to
74 // simulate the passage of time. 74 // simulate the passage of time.
75 base::TimeTicks now_for_test_; 75 base::TimeTicks now_for_test_;
76 76
77 // If set, mouse events will be ignored until this time is reached. This 77 // If set, mouse events will be ignored until this time is reached. This
78 // is to avoid reporting mouse events that occur when displays are turned 78 // is to avoid reporting mouse events that occur when displays are turned
79 // on or off as user activity. 79 // on or off as user activity.
80 base::TimeTicks honor_mouse_events_time_; 80 base::TimeTicks honor_mouse_events_time_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(UserActivityDetector); 82 DISALLOW_COPY_AND_ASSIGN(UserActivityDetector);
83 }; 83 };
84 84
85 } // namespace ui 85 } // namespace ui
86 86
87 #endif // UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_ 87 #endif // UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_
OLDNEW
« no previous file with comments | « ui/base/models/tree_node_model.h ('k') | ui/chromeos/ime/candidate_window_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698