NPError Private_SetValue(NPP instance, NPNVariable variable, void *value) { EnterCodeResource(); NPError rv = NPP_SetValue(instance, variable, value); ExitCodeResource(); return rv; }
void NetscapePlugin::contentsScaleFactorChanged(float scaleFactor) { ASSERT(m_isStarted); #if PLUGIN_ARCHITECTURE(MAC) double contentsScaleFactor = scaleFactor; NPP_SetValue(NPNVcontentsScaleFactor, &contentsScaleFactor); #endif }
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); }
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value) { NPError rv = NPP_SetValue(instance, variable, value); return rv; }
void NetscapePlugin::mutedStateChanged(bool muted) { NPBool value = muted; NPP_SetValue(NPNVmuteAudioBool, &value); }