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

Unified Diff: components/mus/ws/test_utils.h

Issue 2094933003: mus: Add UserActivityMonitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/display.cc ('k') | components/mus/ws/user_activity_monitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/test_utils.h
diff --git a/components/mus/ws/test_utils.h b/components/mus/ws/test_utils.h
index 21cce2bfe80f51921f122437bb142ba0fe1bc4ba..ede927722ecff2659c8b5f49fd4c190b134d7d17 100644
--- a/components/mus/ws/test_utils.h
+++ b/components/mus/ws/test_utils.h
@@ -17,6 +17,7 @@
#include "components/mus/ws/platform_display.h"
#include "components/mus/ws/platform_display_factory.h"
#include "components/mus/ws/test_change_tracker.h"
+#include "components/mus/ws/user_activity_monitor.h"
#include "components/mus/ws/user_display_manager.h"
#include "components/mus/ws/user_id.h"
#include "components/mus/ws/window_manager_state.h"
@@ -67,6 +68,23 @@ class UserDisplayManagerTestApi {
// -----------------------------------------------------------------------------
+class UserActivityMonitorTestApi {
+ public:
+ explicit UserActivityMonitorTestApi(UserActivityMonitor* monitor)
+ : monitor_(monitor) {}
+
+ void SetTimerTaskRunner(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
+ monitor_->idle_timer_.SetTaskRunner(task_runner);
+ }
+
+ private:
+ UserActivityMonitor* monitor_;
+ DISALLOW_COPY_AND_ASSIGN(UserActivityMonitorTestApi);
+};
+
+// -----------------------------------------------------------------------------
+
class WindowTreeTestApi {
public:
explicit WindowTreeTestApi(WindowTree* tree);
« no previous file with comments | « components/mus/ws/display.cc ('k') | components/mus/ws/user_activity_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698