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

Unified Diff: ipc/ipc_sync_message_filter.cc

Issue 2344333002: Expose remote associated interfaces through SyncMessageFilter (Closed)
Patch Set: Created 4 years, 3 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 | « ipc/ipc_sync_message_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_message_filter.cc
diff --git a/ipc/ipc_sync_message_filter.cc b/ipc/ipc_sync_message_filter.cc
index b399833186f0a8099d6f7601079aacefb9b82589..77c6a3a0c77ddff52615b35096fa2a5a104e2151 100644
--- a/ipc/ipc_sync_message_filter.cc
+++ b/ipc/ipc_sync_message_filter.cc
@@ -172,6 +172,11 @@ void SyncMessageFilter::OnFilterAdded(Channel* channel) {
{
base::AutoLock auto_lock(lock_);
channel_ = channel;
+ Channel::AssociatedInterfaceSupport* support =
+ channel_->GetAssociatedInterfaceSupport();
+ if (support)
+ channel_associated_group_ = *support->GetAssociatedGroup();
+
io_task_runner_ = base::ThreadTaskRunnerHandle::Get();
shutdown_watcher_.StartWatching(
shutdown_event_,
@@ -270,4 +275,18 @@ void SyncMessageFilter::OnIOMessageLoopDestroyed() {
shutdown_mojo_event_.Signal();
}
+void SyncMessageFilter::GetGenericRemoteAssociatedInterface(
+ const std::string& interface_name,
+ mojo::ScopedInterfaceEndpointHandle handle) {
+ base::AutoLock auto_lock(lock_);
+ DCHECK(io_task_runner_ && io_task_runner_->BelongsToCurrentThread());
+ if (!channel_)
+ return;
+
+ Channel::AssociatedInterfaceSupport* support =
+ channel_->GetAssociatedInterfaceSupport();
+ support->GetGenericRemoteAssociatedInterface(
+ interface_name, std::move(handle));
+}
+
} // namespace IPC
« no previous file with comments | « ipc/ipc_sync_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698