Bug 1361336 - part3: Pass audio default device-changed message via PContent; r=cpearce draft
authorChun-Min Chang <chun.m.chang@gmail.com>
Tue, 18 Jul 2017 10:42:59 +0800
changeset 616562 d969826aa4894c67aaef177960814675009a8c5e
parent 616561 eda9093d407bc82530775f85acd5ec35213ab786
child 616563 6b1fb33d3de1ab89c67a982f8cdde6f66ab63c33
push id70720
push userbmo:cchang@mozilla.com
push dateThu, 27 Jul 2017 05:33:55 +0000
reviewerscpearce
bugs1361336
milestone56.0a1
Bug 1361336 - part3: Pass audio default device-changed message via PContent; r=cpearce MozReview-Commit-ID: FzdeD2kuSJA
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/PContent.ipdl
--- 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.
      */