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

Unified Diff: services/ui/service.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 | « no previous file | services/ui/ws/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/service.cc
diff --git a/services/ui/service.cc b/services/ui/service.cc
index b11c4cfed7f0b2615608c41f3e2a0065824ff804..d4eca9ccd9a5d58aa6cce8d9d4c37247d32e9ac5 100644
--- a/services/ui/service.cc
+++ b/services/ui/service.cc
@@ -75,7 +75,6 @@ struct Service::PendingRequest {
};
struct Service::UserState {
- std::unique_ptr<clipboard::ClipboardImpl> clipboard;
std::unique_ptr<ws::AccessibilityManager> accessibility;
std::unique_ptr<ws::WindowTreeHostFactory> window_tree_host_factory;
};
@@ -296,10 +295,8 @@ void Service::Create(shell::Connection* connection,
void Service::Create(shell::Connection* connection,
mojom::ClipboardRequest request) {
- UserState* user_state = GetUserState(connection);
- if (!user_state->clipboard)
- user_state->clipboard.reset(new clipboard::ClipboardImpl);
- user_state->clipboard->AddBinding(std::move(request));
+ const ws::UserId& user_id = connection->GetRemoteIdentity().user_id();
+ window_server_->GetClipboardForUser(user_id)->AddBinding(std::move(request));
}
void Service::Create(shell::Connection* connection,
« no previous file with comments | « no previous file | services/ui/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698