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

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
Index: components/mus/ws/test_utils.h
diff --git a/components/mus/ws/test_utils.h b/components/mus/ws/test_utils.h
index 19cb43215c0baa0fd70c3bcf27f6bb3a3beb409c..dc1075fc7d938d66392ff9338a61d6e5b39fc211 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);

Powered by Google App Engine
This is Rietveld 408576698