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

Unified Diff: services/ui/ws/window_server.cc

Issue 2180593002: mus: The window server needs to be able to write to the clipboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn check Created 4 years, 5 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 | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index 92aa4ae19d65c1d2b631ff3ec2132de0d80922db..8403378fe7ed0275a8be8fa4e1d41901baadf821 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -242,6 +242,12 @@ void WindowServer::OnFirstWindowManagerWindowTreeFactoryReady() {
delegate_->CreateDefaultDisplays();
}
+ui::clipboard::ClipboardImpl* WindowServer::GetClipboardForUser(
+ const UserId& user_id) {
+ DCHECK_GT(clipboard_map_.count(user_id), 0u);
+ return clipboard_map_[user_id].get();
+}
+
UserActivityMonitor* WindowServer::GetUserActivityMonitorForUser(
const UserId& user_id) {
DCHECK_GT(activity_monitor_map_.count(user_id), 0u);
@@ -769,10 +775,12 @@ void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id,
void WindowServer::OnUserIdAdded(const UserId& id) {
activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
+ clipboard_map_[id] = base::MakeUnique<clipboard::ClipboardImpl>();
}
void WindowServer::OnUserIdRemoved(const UserId& id) {
activity_monitor_map_.erase(id);
+ clipboard_map_.erase(id);
}
} // namespace ws
« no previous file with comments | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698