コード例 #1
0
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value)
{
  EnterCodeResource();
  NPError rv = NPP_SetValue(instance, variable, value);
  ExitCodeResource();
  return rv;
}
コード例 #2
0
void NetscapePlugin::contentsScaleFactorChanged(float scaleFactor)
{
    ASSERT(m_isStarted);

#if PLUGIN_ARCHITECTURE(MAC)
    double contentsScaleFactor = scaleFactor;
    NPP_SetValue(NPNVcontentsScaleFactor, &contentsScaleFactor);
#endif
}
コード例 #3
0
void NetscapePlugin::privateBrowsingStateChanged(bool privateBrowsingEnabled)
{
    ASSERT(m_isStarted);

    // From https://wiki.mozilla.org/Plugins:PrivateMode
    //   When the browser turns private mode on or off it will call NPP_SetValue for "NPNVprivateModeBool" 
    //   (assigned enum value 18) with a pointer to an NPBool value on all applicable instances.
    //   Plugins should check the boolean value pointed to, not the pointer itself. 
    //   The value will be true when private mode is on.
    NPBool value = privateBrowsingEnabled;
    NPP_SetValue(NPNVprivateModeBool, &value);
}
コード例 #4
0
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value)
{
  NPError rv = NPP_SetValue(instance, variable, value);
  return rv;
}
コード例 #5
0
ファイル: NetscapePlugin.cpp プロジェクト: eocanha/webkit
void NetscapePlugin::mutedStateChanged(bool muted)
{
    NPBool value = muted;
    NPP_SetValue(NPNVmuteAudioBool, &value);
}