Bug 1361336 - Part 3: Pass audio default device-changed message via PContent. r=cpearce, a=lizzard
authorChun-Min Chang <chun.m.chang@gmail.com>
Tue, 18 Jul 2017 10:42:59 +0800
changeset 421656 de020e9792ff39cf66e6b5c43ce6b7c9cfbabf72
parent 421655 7ffa5f4b3dde34ffb59a9e9b25072414f6202ced
child 421657 2194d0f757a9db0b1189940cdebde4177e12c35b
push id7736
push userryanvm@gmail.com
push dateMon, 11 Sep 2017 15:47:51 +0000
treeherdermozilla-beta@94cf7f1ee06b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lizzard
bugs1361336
milestone56.0
Bug 1361336 - Part 3: Pass audio default device-changed message via PContent. r=cpearce, a=lizzard 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
@@ -1327,16 +1327,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
@@ -356,16 +356,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.
      */