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

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

Issue 2639703004: mus: Forward user activity from window server to detector. (Closed)
Patch Set: address jamescook@'s comments Created 3 years, 11 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/aura/test/run_all_unittests.cc ('k') | ui/base/user_activity/user_activity_detector.cc » ('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/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 27 matching lines...) Expand all
38 38
39 void set_now_for_test(base::TimeTicks now) { now_for_test_ = now; } 39 void set_now_for_test(base::TimeTicks now) { now_for_test_ = now; }
40 40
41 bool HasObserver(const UserActivityObserver* observer) const; 41 bool HasObserver(const UserActivityObserver* observer) const;
42 void AddObserver(UserActivityObserver* observer); 42 void AddObserver(UserActivityObserver* observer);
43 void RemoveObserver(UserActivityObserver* observer); 43 void RemoveObserver(UserActivityObserver* observer);
44 44
45 // Called when displays are about to be turned on or off. 45 // Called when displays are about to be turned on or off.
46 void OnDisplayPowerChanging(); 46 void OnDisplayPowerChanging();
47 47
48 // Handles reports of user activity originating from outside of
49 // PlatformEventSource (e.g. the window server).
50 void HandleExternalUserActivity();
51
48 // ui::PlatformEventObserver: 52 // ui::PlatformEventObserver:
49 void WillProcessEvent(const PlatformEvent& platform_event) override {} 53 void WillProcessEvent(const PlatformEvent& platform_event) override {}
50 void DidProcessEvent(const PlatformEvent& platform_event) override; 54 void DidProcessEvent(const PlatformEvent& platform_event) override;
51 55
52 private: 56 private:
53 friend class UserActivityDetectorTest; 57 friend class UserActivityDetectorTest;
54 58
55 // Returns |now_for_test_| if set or base::TimeTicks::Now() otherwise. 59 // Returns |now_for_test_| if set or base::TimeTicks::Now() otherwise.
56 base::TimeTicks GetCurrentTime() const; 60 base::TimeTicks GetCurrentTime() const;
57 61
(...skipping 24 matching lines...) Expand all
82 // is to avoid reporting mouse events that occur when displays are turned 86 // is to avoid reporting mouse events that occur when displays are turned
83 // on or off as user activity. 87 // on or off as user activity.
84 base::TimeTicks honor_mouse_events_time_; 88 base::TimeTicks honor_mouse_events_time_;
85 89
86 DISALLOW_COPY_AND_ASSIGN(UserActivityDetector); 90 DISALLOW_COPY_AND_ASSIGN(UserActivityDetector);
87 }; 91 };
88 92
89 } // namespace ui 93 } // namespace ui
90 94
91 #endif // UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_ 95 #endif // UI_BASE_USER_ACTIVITY_USER_ACTIVITY_DETECTOR_H_
OLDNEW
« no previous file with comments | « ui/aura/test/run_all_unittests.cc ('k') | ui/base/user_activity/user_activity_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698