Bug 1347758 - part4 : add audio channel log. r=Ehsan

MozReview-Commit-ID: LNXzRZx2rC2
This commit is contained in:
Alastor Wu
2017-03-24 12:04:15 +08:00
parent ef626de404
commit 45a0c2c35f
7 changed files with 123 additions and 19 deletions

View File

@@ -1738,6 +1738,11 @@ nsNPAPIPluginInstance::GetOrCreateAudioChannelAgent(nsIAudioChannelAgent** aAgen
NS_IMETHODIMP
nsNPAPIPluginInstance::WindowVolumeChanged(float aVolume, bool aMuted)
{
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("nsNPAPIPluginInstance, WindowVolumeChanged, "
"this = %p, aVolume = %f, aMuted = %s\n",
this, aVolume, aMuted ? "true" : "false"));
// We just support mute/unmute
nsresult rv = SetMuted(aMuted);
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "SetMuted failed");
@@ -1757,6 +1762,10 @@ nsNPAPIPluginInstance::WindowVolumeChanged(float aVolume, bool aMuted)
NS_IMETHODIMP
nsNPAPIPluginInstance::WindowSuspendChanged(nsSuspendedTypes aSuspend)
{
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("nsNPAPIPluginInstance, WindowSuspendChanged, "
"this = %p, aSuspend = %s\n", this, SuspendTypeToStr(aSuspend)));
// It doesn't support suspended, so we just do something like mute/unmute.
WindowVolumeChanged(1.0, /* useless */
aSuspend != nsISuspendedTypes::NONE_SUSPENDED);