Bug 441197: Maintain an audio session across processes. r=jimm
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
#ifdef XP_WIN
|
||||
#include "COMMessageFilter.h"
|
||||
#include "nsWindowsDllInterceptor.h"
|
||||
#include "mozilla/widget/AudioSession.h"
|
||||
#endif
|
||||
|
||||
#ifdef OS_MACOSX
|
||||
@@ -594,6 +595,10 @@ PluginModuleChild::AnswerNP_Shutdown(NPError *rv)
|
||||
{
|
||||
AssertPluginThread();
|
||||
|
||||
#if defined XP_WIN && MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
|
||||
mozilla::widget::StopAudioSession();
|
||||
#endif
|
||||
|
||||
// the PluginModuleParent shuts down this process after this RPC
|
||||
// call pops off its stack
|
||||
|
||||
@@ -649,6 +654,25 @@ PluginModuleChild::AnswerNPP_GetSitesWithData(InfallibleTArray<nsCString>* aResu
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginModuleChild::RecvSetAudioSessionData(const nsID& aId,
|
||||
const nsString& aDisplayName,
|
||||
const nsString& aIconPath)
|
||||
{
|
||||
nsresult rv;
|
||||
#if !defined XP_WIN || MOZ_WINSDK_TARGETVER < MOZ_NTDDI_LONGHORN
|
||||
NS_RUNTIMEABORT("Not Reached!");
|
||||
return false;
|
||||
#else
|
||||
rv = mozilla::widget::RecvAudioSessionData(aId, aDisplayName, aIconPath);
|
||||
NS_ENSURE_SUCCESS(rv, true); // Bail early if this fails
|
||||
|
||||
// Ignore failures here; we can't really do anything about them
|
||||
mozilla::widget::StartAudioSession();
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChild::QuickExit()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user