Example #1
0
/*static*/ void
VRManagerChild::InitSameProcess()
{
  MOZ_ASSERT(NS_IsMainThread());
  MOZ_ASSERT(!sVRManagerChildSingleton);

  sVRManagerChildSingleton = new VRManagerChild();
  sVRManagerParentSingleton = VRManagerParent::CreateSameProcess();
  sVRManagerChildSingleton->Open(sVRManagerParentSingleton->GetIPCChannel(),
                                 mozilla::layers::CompositorThreadHolder::Loop(),
                                 mozilla::ipc::ChildSide);
}
Example #2
0
/*static*/ void
VRManagerChild::StartUpSameProcess()
{
  NS_ASSERTION(NS_IsMainThread(), "Should be on the main Thread!");
  if (sVRManagerChildSingleton == nullptr) {
    sVRManagerChildSingleton = new VRManagerChild();
    sVRManagerParentSingleton = VRManagerParent::CreateSameProcess();
    sVRManagerChildSingleton->Open(sVRManagerParentSingleton->GetIPCChannel(),
                                   mozilla::layers::CompositorThreadHolder::Loop(),
                                   mozilla::ipc::ChildSide);
  }
}
Example #3
0
void
UiCompositorControllerChild::OpenForSameProcess()
{
  MOZ_ASSERT(sParent);
  MOZ_ASSERT(!sChild);
  MOZ_ASSERT(IsOnUiThread());

  if (!Open(sParent->GetIPCChannel(),
           mozilla::layers::CompositorThreadHolder::Loop(),
           mozilla::ipc::ChildSide)) {
    sParent = nullptr;
    return;
  }

  AddRef();
  sChild = this;
  DoCachedResize();
}