MCPcopy Create free account
hub / github.com/electron/electron / BindReceiver

Method BindReceiver

shell/browser/electron_api_sw_ipc_handler_impl.cc:213–228  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

211
212// static
213void ElectronApiSWIPCHandlerImpl::BindReceiver(
214 content::ChildProcessId render_process_id,
215 int64_t version_id,
216 mojo::PendingAssociatedReceiver<mojom::ElectronApiIPC> receiver) {
217 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
218 auto* render_process_host =
219 content::RenderProcessHost::FromID(render_process_id);
220 if (!render_process_host) {
221 return;
222 }
223 auto* service_worker_ipc_list = ServiceWorkerIPCList::Get(
224 render_process_host, /*create_if_not_exists=*/true);
225 service_worker_ipc_list->list.push_back(
226 std::make_unique<ElectronApiSWIPCHandlerImpl>(
227 render_process_host, version_id, std::move(receiver)));
228}
229
230} // namespace electron

Callers 2

BindPrintManagerHostMethod · 0.80
BindSpellCheckerFunction · 0.80

Calls 2

FromIDFunction · 0.85
GetFunction · 0.85

Tested by

no test coverage detected