RemoteWorkerServiceChild.cpp (1265B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #include "RemoteWorkerServiceChild.h" 8 9 #include "RemoteWorkerChild.h" 10 #include "RemoteWorkerController.h" 11 12 namespace mozilla::dom { 13 14 RemoteWorkerServiceChild::RemoteWorkerServiceChild() = default; 15 16 RemoteWorkerServiceChild::~RemoteWorkerServiceChild() = default; 17 18 already_AddRefed<PRemoteWorkerChild> 19 RemoteWorkerServiceChild::AllocPRemoteWorkerChild( 20 const RemoteWorkerData& aData, 21 mozilla::ipc::Endpoint<PRemoteWorkerNonLifeCycleOpControllerChild>& 22 aChildEp) { 23 return MakeAndAddRef<RemoteWorkerChild>(aData); 24 } 25 26 mozilla::ipc::IPCResult RemoteWorkerServiceChild::RecvPRemoteWorkerConstructor( 27 PRemoteWorkerChild* aActor, const RemoteWorkerData& aData, 28 mozilla::ipc::Endpoint<PRemoteWorkerNonLifeCycleOpControllerChild>&& 29 aChildEp) { 30 RemoteWorkerChild* actor = static_cast<RemoteWorkerChild*>(aActor); 31 actor->ExecWorker(aData, std::move(aChildEp)); 32 return IPC_OK(); 33 } 34 35 } // namespace mozilla::dom