Example #1
0
 virtual mozilla::ipc::IPCResult
 RecvGetCurrentNetworkInformation(NetworkInformation* aNetworkInfo) override {
   hal::GetCurrentNetworkInformation(aNetworkInfo);
   return IPC_OK();
 }
mozilla::ipc::IPCResult
PresentationParent::Recv__delete__()
{
  return IPC_OK();
}
Example #3
0
mozilla::ipc::IPCResult
TestAsyncReturnsChild::RecvNoReturn(NoReturnResolver&& aResolve)
{
  // Not resolving the promise intentionally
  return IPC_OK();
}
mozilla::ipc::IPCResult
GMPVideoEncoderParent::RecvShutdown()
{
  Shutdown();
  return IPC_OK();
}
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvGetAPZTestData(APZTestData* aOutData)
{
  mCompositorBridge->GetAPZTestData(GetLayersId(), aOutData);
  return IPC_OK();
}
mozilla::ipc::IPCResult ImageContainerParent::RecvAsyncDelete()
{
  Unused << PImageContainerParent::Send__delete__(this);
  return IPC_OK();
}
mozilla::ipc::IPCResult
TestRaceDeferralChild::AnswerWin()
{
    return IPC_OK();
}
Example #8
0
 virtual mozilla::ipc::IPCResult
 RecvDisableSwitchNotifications(const SwitchDevice& aDevice) override
 {
   hal::UnregisterSwitchObserver(aDevice, this);
   return IPC_OK();
 }
Example #9
0
 virtual mozilla::ipc::IPCResult
 RecvNotifyBatteryChange(const BatteryInformation& aBatteryInfo) override {
   hal::NotifyBatteryChange(aBatteryInfo);
   return IPC_OK();
 }
Example #10
0
 virtual mozilla::ipc::IPCResult
 RecvDisableWakeLockNotifications() override
 {
   hal::UnregisterWakeLockObserver(this);
   return IPC_OK();
 }
Example #11
0
 virtual mozilla::ipc::IPCResult
 RecvGetWakeLockInfo(const nsString &aTopic, WakeLockInformation *aWakeLockInfo) override
 {
   hal::GetWakeLockInfo(aTopic, aWakeLockInfo);
   return IPC_OK();
 }
Example #12
0
 virtual mozilla::ipc::IPCResult
 RecvDisableSensorNotifications(const SensorType &aSensor) override {
   hal::UnregisterSensorObserver(aSensor, this);
   return IPC_OK();
 }
Example #13
0
 virtual mozilla::ipc::IPCResult
 RecvUnlockScreenOrientation() override
 {
   hal::UnlockScreenOrientation();
   return IPC_OK();
 }
Example #14
0
 virtual mozilla::ipc::IPCResult
 RecvDisableScreenConfigurationNotifications() override {
   hal::UnregisterScreenConfigurationObserver(this);
   return IPC_OK();
 }
Example #15
0
mozilla::ipc::IPCResult
GMPChild::AnswerStartPlugin(const nsString& aAdapter)
{
  LOGD("%s", __FUNCTION__);

  if (!PreLoadPluginVoucher()) {
    NS_WARNING("Plugin voucher failed to load!");
    return IPC_FAIL_NO_REASON(this);
  }
  PreLoadSandboxVoucher();

  nsCString libPath;
  if (!GetUTF8LibPath(libPath)) {
    return IPC_FAIL_NO_REASON(this);
  }

  auto platformAPI = new GMPPlatformAPI();
  InitPlatformAPI(*platformAPI, this);

  mGMPLoader = GMPProcessChild::GetGMPLoader();
  if (!mGMPLoader) {
    NS_WARNING("Failed to get GMPLoader");
    delete platformAPI;
    return IPC_FAIL_NO_REASON(this);
  }

  bool isWidevine = aAdapter.EqualsLiteral("widevine");
#if defined(MOZ_GMP_SANDBOX) && defined(XP_MACOSX)
  MacSandboxPluginType pluginType = MacSandboxPluginType_GMPlugin_Default;
  if (isWidevine) {
    pluginType = MacSandboxPluginType_GMPlugin_EME_Widevine;
  }
  if (!SetMacSandboxInfo(pluginType)) {
    NS_WARNING("Failed to set Mac GMP sandbox info");
    delete platformAPI;
    return IPC_FAIL_NO_REASON(this);
  }
#endif

  GMPAdapter* adapter = (isWidevine) ? new WidevineAdapter() : nullptr;
  if (!mGMPLoader->Load(libPath.get(),
                        libPath.Length(),
                        mNodeId.BeginWriting(),
                        mNodeId.Length(),
                        platformAPI,
                        adapter)) {
    NS_WARNING("Failed to load GMP");
    delete platformAPI;
    return IPC_FAIL_NO_REASON(this);
  }

  void* sh = nullptr;
  GMPAsyncShutdownHost* host = static_cast<GMPAsyncShutdownHost*>(this);
  GMPErr err = GetAPI(GMP_API_ASYNC_SHUTDOWN, host, &sh);
  if (err == GMPNoErr && sh) {
    mAsyncShutdown = reinterpret_cast<GMPAsyncShutdown*>(sh);
    SendAsyncShutdownRequired();
  }

  return IPC_OK();
}
Example #16
0
 virtual mozilla::ipc::IPCResult
 RecvNotifyNetworkChange(const NetworkInformation& aNetworkInfo) override {
   hal::NotifyNetworkChange(aNetworkInfo);
   return IPC_OK();
 }
Example #17
0
mozilla::ipc::IPCResult
GMPChild::RecvCrashPluginNow()
{
  MOZ_CRASH();
  return IPC_OK();
}
Example #18
0
 virtual mozilla::ipc::IPCResult
 RecvNotifyWakeLockChange(const WakeLockInformation& aWakeLockInfo) override {
   hal::NotifyWakeLockChange(aWakeLockInfo);
   return IPC_OK();
 }
mozilla::ipc::IPCResult
PSMContentDownloaderParent::RecvOnStartRequest(const uint32_t& contentLength)
{
  mByteData.SetCapacity(contentLength);
  return IPC_OK();
}
Example #20
0
 virtual mozilla::ipc::IPCResult
 RecvNotifyScreenConfigurationChange(const ScreenConfiguration& aScreenConfiguration) override {
   hal::NotifyScreenConfigurationChange(aScreenConfiguration);
   return IPC_OK();
 }
mozilla::ipc::IPCResult
DocAccessibleParent::RecvShowEvent(const ShowEventData& aData,
                                   const bool& aFromUser)
{
  if (mShutdown)
    return IPC_OK();

  MOZ_ASSERT(CheckDocTree());

  if (aData.NewTree().IsEmpty()) {
    NS_ERROR("no children being added");
    return IPC_FAIL_NO_REASON(this);
  }

  ProxyAccessible* parent = GetAccessible(aData.ID());

  // XXX This should really never happen, but sometimes we fail to fire the
  // required show events.
  if (!parent) {
    NS_ERROR("adding child to unknown accessible");
#ifdef DEBUG
    return IPC_FAIL(this, "unknown parent accessible");
#else
    return IPC_OK();
#endif
  }

  uint32_t newChildIdx = aData.Idx();
  if (newChildIdx > parent->ChildrenCount()) {
    NS_ERROR("invalid index to add child at");
#ifdef DEBUG
    return IPC_FAIL(this, "invalid index");
#else
    return IPC_OK();
#endif
  }

  uint32_t consumed = AddSubtree(parent, aData.NewTree(), 0, newChildIdx);
  MOZ_ASSERT(consumed == aData.NewTree().Length());

  // XXX This shouldn't happen, but if we failed to add children then the below
  // is pointless and can crash.
  if (!consumed) {
    return IPC_FAIL(this, "failed to add children");
  }

#ifdef DEBUG
  for (uint32_t i = 0; i < consumed; i++) {
    uint64_t id = aData.NewTree()[i].ID();
    MOZ_ASSERT(mAccessibles.GetEntry(id));
  }
#endif

  MOZ_ASSERT(CheckDocTree());

  ProxyAccessible* target = parent->ChildAt(newChildIdx);
  ProxyShowHideEvent(target, parent, true, aFromUser);

  if (!nsCoreUtils::AccEventObserversExist()) {
    return IPC_OK();
  }

  uint32_t type = nsIAccessibleEvent::EVENT_SHOW;
  xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(target);
  xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
  nsIDOMNode* node = nullptr;
  RefPtr<xpcAccEvent> event = new xpcAccEvent(type, xpcAcc, doc, node,
                                              aFromUser);
  nsCoreUtils::DispatchAccEvent(Move(event));

  return IPC_OK();
}
Example #22
0
 virtual mozilla::ipc::IPCResult
 RecvNotifySwitchChange(const mozilla::hal::SwitchEvent& aEvent) override {
   hal::NotifySwitchChange(aEvent);
   return IPC_OK();
 }
mozilla::ipc::IPCResult
RenderFrameParent::RecvNotifyCompositorTransaction()
{
  TriggerRepaint();
  return IPC_OK();
}
Example #24
0
mozilla::ipc::IPCResult
HalChild::RecvNotifySensorChange(const hal::SensorData &aSensorData) {
  hal::NotifySensorChange(aSensorData);

  return IPC_OK();
}
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvLeaveTestMode()
{
  mCompositorBridge->LeaveTestMode(GetLayersId());
  return IPC_OK();
}
mozilla::ipc::IPCResult
AltDataOutputStreamChild::RecvError(const nsresult& err)
{
  mError = err;
  return IPC_OK();
}
Example #27
0
mozilla::ipc::IPCResult
TestAsyncReturnsParent::RecvPong(PongResolver&& aResolve)
{
  aResolve(MakeTuple(sMagic1, sMagic2));
  return IPC_OK();
}
mozilla::ipc::IPCResult APZInputBridgeParent::RecvUpdateWheelTransaction(
    const LayoutDeviceIntPoint& aRefPoint, const EventMessage& aEventMessage) {
  mTreeManager->InputBridge()->UpdateWheelTransaction(aRefPoint, aEventMessage);
  return IPC_OK();
}
mozilla::ipc::IPCResult
CompositorWidgetParent::RecvNotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize)
{
  NotifyClientSizeChanged(aClientSize);
  return IPC_OK();
}
Example #30
0
 virtual mozilla::ipc::IPCResult
 RecvEnableNetworkNotifications() override {
   // We give all content access to this network-status information.
   hal::RegisterNetworkObserver(this);
   return IPC_OK();
 }