• Home
  • Raw
  • Download

Lines Matching refs:endpoint

216       Endpoint* endpoint = new Endpoint(this, id);  in AssociateInterface()  local
218 endpoint->set_peer_closed(); in AssociateInterface()
219 endpoint->set_handle_created(); in AssociateInterface()
220 endpoints_.insert({id, endpoint}); in AssociateInterface()
228 Endpoint* endpoint = FindEndpoint(id); in AssociateInterface() local
229 if (endpoint) in AssociateInterface()
230 MarkClosedAndMaybeRemove(endpoint); in AssociateInterface()
255 Endpoint* endpoint = FindOrInsertEndpoint(id, &inserted); in CreateLocalEndpointHandle() local
257 DCHECK(!endpoint->handle_created()); in CreateLocalEndpointHandle()
259 endpoint->set_peer_closed(); in CreateLocalEndpointHandle()
261 if (endpoint->handle_created()) in CreateLocalEndpointHandle()
265 endpoint->set_handle_created(); in CreateLocalEndpointHandle()
277 Endpoint* endpoint = endpoints_[id].get(); in CloseEndpointHandle() local
278 DCHECK(!endpoint->client()); in CloseEndpointHandle()
279 DCHECK(!endpoint->closed()); in CloseEndpointHandle()
280 MarkClosedAndMaybeRemove(endpoint); in CloseEndpointHandle()
299 Endpoint* endpoint = endpoints_[id].get(); in AttachEndpointClient() local
300 endpoint->AttachClient(client, std::move(runner)); in AttachEndpointClient()
302 if (endpoint->peer_closed()) in AttachEndpointClient()
303 NotifyEndpointOfError(endpoint, true /* force_async */); in AttachEndpointClient()
305 return endpoint; in AttachEndpointClient()
317 Endpoint* endpoint = endpoints_[id].get(); in DetachEndpointClient() local
318 endpoint->DetachClient(); in DetachEndpointClient()
632 Endpoint* endpoint = iter->second.get(); in ~ChannelAssociatedGroupController() local
635 if (!endpoint->closed()) { in ~ChannelAssociatedGroupController()
639 DCHECK(!endpoint->client()); in ~ChannelAssociatedGroupController()
640 DCHECK(endpoint->peer_closed()); in ~ChannelAssociatedGroupController()
641 MarkClosedAndMaybeRemove(endpoint); in ~ChannelAssociatedGroupController()
643 MarkPeerClosedAndMaybeRemove(endpoint); in ~ChannelAssociatedGroupController()
697 Endpoint* endpoint = iter->second.get(); in OnPipeError() local
700 if (endpoint->client()) in OnPipeError()
701 endpoints_to_notify.push_back(endpoint); in OnPipeError()
703 MarkPeerClosedAndMaybeRemove(endpoint); in OnPipeError()
706 for (auto& endpoint : endpoints_to_notify) { in OnPipeError() local
709 if (endpoint->client()) in OnPipeError()
710 NotifyEndpointOfError(endpoint.get(), false /* force_async */); in OnPipeError()
714 void NotifyEndpointOfError(Endpoint* endpoint, bool force_async) { in NotifyEndpointOfError() argument
716 DCHECK(endpoint->task_runner() && endpoint->client()); in NotifyEndpointOfError()
717 if (endpoint->task_runner()->RunsTasksInCurrentSequence() && !force_async) { in NotifyEndpointOfError()
718 mojo::InterfaceEndpointClient* client = endpoint->client(); in NotifyEndpointOfError()
720 endpoint->disconnect_reason()); in NotifyEndpointOfError()
725 endpoint->task_runner()->PostTask( in NotifyEndpointOfError()
729 this, endpoint->id(), base::Unretained(endpoint))); in NotifyEndpointOfError()
734 Endpoint* endpoint) { in NotifyEndpointOfErrorOnEndpointThread() argument
737 if (iter == endpoints_.end() || iter->second.get() != endpoint) in NotifyEndpointOfErrorOnEndpointThread()
739 if (!endpoint->client()) in NotifyEndpointOfErrorOnEndpointThread()
742 DCHECK(endpoint->task_runner()->RunsTasksInCurrentSequence()); in NotifyEndpointOfErrorOnEndpointThread()
743 NotifyEndpointOfError(endpoint, false /* force_async */); in NotifyEndpointOfErrorOnEndpointThread()
746 void MarkClosedAndMaybeRemove(Endpoint* endpoint) { in MarkClosedAndMaybeRemove() argument
748 endpoint->set_closed(); in MarkClosedAndMaybeRemove()
749 if (endpoint->closed() && endpoint->peer_closed()) in MarkClosedAndMaybeRemove()
750 endpoints_.erase(endpoint->id()); in MarkClosedAndMaybeRemove()
753 void MarkPeerClosedAndMaybeRemove(Endpoint* endpoint) { in MarkPeerClosedAndMaybeRemove() argument
755 endpoint->set_peer_closed(); in MarkPeerClosedAndMaybeRemove()
756 endpoint->SignalSyncMessageEvent(); in MarkPeerClosedAndMaybeRemove()
757 if (endpoint->closed() && endpoint->peer_closed()) in MarkPeerClosedAndMaybeRemove()
758 endpoints_.erase(endpoint->id()); in MarkPeerClosedAndMaybeRemove()
765 Endpoint* endpoint = FindEndpoint(id); in FindOrInsertEndpoint() local
766 if (!endpoint) { in FindOrInsertEndpoint()
767 endpoint = new Endpoint(this, id); in FindOrInsertEndpoint()
768 endpoints_.insert({id, endpoint}); in FindOrInsertEndpoint()
772 return endpoint; in FindOrInsertEndpoint()
795 Endpoint* endpoint = FindEndpoint(id); in Accept() local
796 if (!endpoint) in Accept()
799 mojo::InterfaceEndpointClient* client = endpoint->client(); in Accept()
800 if (!client || !endpoint->task_runner()->RunsTasksInCurrentSequence()) { in Accept()
817 endpoint->EnqueueSyncMessage(std::move(message_wrapper)); in Accept()
848 Endpoint* endpoint = FindEndpoint(id); in AcceptOnProxyThread() local
849 if (!endpoint) in AcceptOnProxyThread()
852 mojo::InterfaceEndpointClient* client = endpoint->client(); in AcceptOnProxyThread()
856 DCHECK(endpoint->task_runner()->RunsTasksInCurrentSequence()); in AcceptOnProxyThread()
875 Endpoint* endpoint = FindEndpoint(interface_id); in AcceptSyncMessage() local
876 if (!endpoint) in AcceptSyncMessage()
881 mojo::InterfaceEndpointClient* client = endpoint->client(); in AcceptSyncMessage()
885 DCHECK(endpoint->task_runner()->RunsTasksInCurrentSequence()); in AcceptSyncMessage()
886 MessageWrapper message_wrapper = endpoint->PopSyncMessage(message_id); in AcceptSyncMessage()
911 scoped_refptr<Endpoint> endpoint = FindOrInsertEndpoint(id, nullptr); in OnPeerAssociatedEndpointClosed() local
913 endpoint->set_disconnect_reason(reason); in OnPeerAssociatedEndpointClosed()
914 if (!endpoint->peer_closed()) { in OnPeerAssociatedEndpointClosed()
915 if (endpoint->client()) in OnPeerAssociatedEndpointClosed()
916 NotifyEndpointOfError(endpoint.get(), false /* force_async */); in OnPeerAssociatedEndpointClosed()
917 MarkPeerClosedAndMaybeRemove(endpoint.get()); in OnPeerAssociatedEndpointClosed()