mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167690 - Part 3: Hook up NPNVmuteAudioBool to the plugin process; r=josh
This commit is contained in:
parent
3b6bd2528b
commit
d9c418a0cc
@ -87,6 +87,8 @@ child:
|
||||
intr NPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId()
|
||||
returns (nsCString plug_id, NPError result);
|
||||
|
||||
intr NPP_SetValue_NPNVmuteAudioBool(bool muted) returns (NPError result);
|
||||
|
||||
intr NPP_HandleEvent(NPRemoteEvent event)
|
||||
returns (int16_t handled);
|
||||
// special cases where we need to a shared memory buffer
|
||||
|
@ -773,6 +773,20 @@ PluginInstanceChild::AnswerNPP_SetValue_NPNVprivateModeBool(const bool& value,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginInstanceChild::AnswerNPP_SetValue_NPNVmuteAudioBool(const bool& value,
|
||||
NPError* result)
|
||||
{
|
||||
if (!mPluginIface->setvalue) {
|
||||
*result = NPERR_GENERIC_ERROR;
|
||||
return true;
|
||||
}
|
||||
|
||||
NPBool v = value;
|
||||
*result = mPluginIface->setvalue(GetNPP(), NPNVmuteAudioBool, &v);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginInstanceChild::AnswerNPP_HandleEvent(const NPRemoteEvent& event,
|
||||
int16_t* handled)
|
||||
|
@ -80,6 +80,8 @@ protected:
|
||||
NPError* aResult) override;
|
||||
virtual bool
|
||||
AnswerNPP_SetValue_NPNVprivateModeBool(const bool& value, NPError* result) override;
|
||||
virtual bool
|
||||
AnswerNPP_SetValue_NPNVmuteAudioBool(const bool& value, NPError* result) override;
|
||||
|
||||
virtual bool
|
||||
AnswerNPP_HandleEvent(const NPRemoteEvent& event, int16_t* handled) override;
|
||||
|
@ -1151,15 +1151,22 @@ PluginInstanceParent::NPP_GetValue(NPPVariable aVariable,
|
||||
NPError
|
||||
PluginInstanceParent::NPP_SetValue(NPNVariable variable, void* value)
|
||||
{
|
||||
NPError result;
|
||||
switch (variable) {
|
||||
case NPNVprivateModeBool:
|
||||
NPError result;
|
||||
if (!CallNPP_SetValue_NPNVprivateModeBool(*static_cast<NPBool*>(value),
|
||||
&result))
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
return result;
|
||||
|
||||
case NPNVmuteAudioBool:
|
||||
if (!CallNPP_SetValue_NPNVmuteAudioBool(*static_cast<NPBool*>(value),
|
||||
&result))
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
return result;
|
||||
|
||||
default:
|
||||
NS_ERROR("Unhandled NPNVariable in NPP_SetValue");
|
||||
MOZ_LOG(GetPluginLog(), LogLevel::Warning,
|
||||
|
Loading…
Reference in New Issue
Block a user