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

Unified Diff: components/mus/mus_app.cc

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/mus_app.h ('k') | components/mus/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/mus_app.cc
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index ff986bf67cf7f5d2c9277ed89b6089b64c283a78..8ec1901a0c6a4ef0ce862befda8bc01a69013d94 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -21,6 +21,7 @@
#include "components/mus/ws/display_binding.h"
#include "components/mus/ws/display_manager.h"
#include "components/mus/ws/platform_screen.h"
+#include "components/mus/ws/user_activity_monitor.h"
#include "components/mus/ws/user_display_manager.h"
#include "components/mus/ws/window_server.h"
#include "components/mus/ws/window_server_test_impl.h"
@@ -225,6 +226,7 @@ bool MusApp::AcceptConnection(Connection* connection) {
connection->AddInterface<mojom::Clipboard>(this);
connection->AddInterface<mojom::DisplayManager>(this);
connection->AddInterface<mojom::UserAccessManager>(this);
+ connection->AddInterface<mojom::UserActivityMonitor>(this);
connection->AddInterface<WindowTreeHostFactory>(this);
connection->AddInterface<mojom::WindowManagerWindowTreeFactory>(this);
connection->AddInterface<mojom::WindowTreeFactory>(this);
@@ -321,6 +323,14 @@ void MusApp::Create(shell::Connection* connection,
}
void MusApp::Create(shell::Connection* connection,
+ mojom::UserActivityMonitorRequest request) {
+ AddUserIfNecessary(connection);
+ const ws::UserId& user_id = connection->GetRemoteIdentity().user_id();
+ window_server_->GetUserActivityMonitorForUser(user_id)->Add(
+ std::move(request));
+}
+
+void MusApp::Create(shell::Connection* connection,
mojom::WindowManagerWindowTreeFactoryRequest request) {
AddUserIfNecessary(connection);
window_server_->window_manager_window_tree_factory_set()->Add(
« no previous file with comments | « components/mus/mus_app.h ('k') | components/mus/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698