Bug 1361336 - part3: Pass audio default device-changed message via PContent; r=cpearce
MozReview-Commit-ID: FzdeD2kuSJA
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1335,16 +1335,22 @@ ContentChild::RecvReinitRendering(Endpoi
}
}
VideoDecoderManagerChild::InitForContent(Move(aVideoManager));
return IPC_OK();
}
mozilla::ipc::IPCResult
+ContentChild::RecvAudioDefaultDeviceChange()
+{
+ return IPC_OK();
+}
+
+mozilla::ipc::IPCResult
ContentChild::RecvReinitRenderingForDeviceReset()
{
gfxPlatform::GetPlatform()->CompositorUpdated();
nsTArray<RefPtr<TabChild>> tabs = TabChild::GetAll();
for (const auto& tabChild : tabs) {
if (tabChild->LayersId()) {
tabChild->ReinitRenderingForDeviceReset();
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -170,16 +170,18 @@ public:
mozilla::ipc::IPCResult
RecvReinitRendering(
Endpoint<PCompositorManagerChild>&& aCompositor,
Endpoint<PImageBridgeChild>&& aImageBridge,
Endpoint<PVRManagerChild>&& aVRBridge,
Endpoint<PVideoDecoderManagerChild>&& aVideoManager,
nsTArray<uint32_t>&& namespaces) override;
+ virtual mozilla::ipc::IPCResult RecvAudioDefaultDeviceChange() override;
+
mozilla::ipc::IPCResult RecvReinitRenderingForDeviceReset() override;
virtual mozilla::ipc::IPCResult RecvSetProcessSandbox(const MaybeFileDesc& aBroker) override;
virtual PBrowserChild* AllocPBrowserChild(const TabId& aTabId,
const TabId& aSameTabGroupAs,
const IPCTabContext& aContext,
const uint32_t& aChromeFlags,
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -358,16 +358,18 @@ child:
// newly launched GPU process, or the compositor thread of the UI process.
async ReinitRendering(
Endpoint<PCompositorManagerChild> compositor,
Endpoint<PImageBridgeChild> bridge,
Endpoint<PVRManagerChild> vr,
Endpoint<PVideoDecoderManagerChild> video,
uint32_t[] namespaces);
+ async AudioDefaultDeviceChange();
+
// Re-create the rendering stack for a device reset.
async ReinitRenderingForDeviceReset();
/**
* Enable system-level sandboxing features, if available. Can
* usually only be performed zero or one times. The child may
* abnormally exit if this fails; the details are OS-specific.
*/