NPAPI:PluginOptOut: Difference between revisions

Jump to navigation Jump to search
Line 31: Line 31:
= Specification =
= Specification =


One new error value is added for return values for the following existing routines.  That error value indicates that the plugin requests the browser to act like the plugin doesn't exist at that time.
One new error value is added for return values for the following existing routine.  That error value indicates that the plugin requests the browser to act like the plugin doesn't exist at that time.


Return Value:
Return Value:


* <code>NPERR_PLUGIN_OPT_OUT</code> (value to be determined): returning this value from one of the three calls means the browser should act as if the mime type is unhandled and exhibit its default behavior in that case.
* <code>NPERR_PLUGIN_OPT_OUT</code> (value to be determined): returning this value means the browser should act as if the mime type is unhandled and exhibit its default behavior in that case, as if the plugin wasn't installed.


Procedures:
Procedures:


* <code>NP_Initialize</code>: The plugin returns <code>NPERR_PLUGIN_REFUSED</code> when the it detects a permanent context (like architecture, or unsupported browser).  It is expected that the browser should then always act as if the plugin didn't exist.  The browser may remember this and never call the plugin again, or it may call <code>NP_Initialize</code> every time a resource with the appropriate mime type(s) is loaded.  In that case the intention of this specification is that the plugin will return the same error code each time.
* <code>NP_Initialize</code>: The plugin returns <code>NPERR_PLUGIN_OPT_OUT</code> when the it detects a permanent context (like architecture, or unsupported browser).  It is expected that the browser should then always act as if the plugin didn't exist.  The browser may remember this and never call the plugin again, or it may call <code>NP_Initialize</code> every time a resource with the appropriate mime type(s) is loaded.  In that case the intention of this specification is that the plugin will return the same error code each time.
** Q: Should the plugin expect <code>NP_Shutdown</code> called after that?
* <code>NPP_NewStream</code>: This is returned when the plugin can handle some resources but perhapse not others. There may be certain internal settings in the plugin that allow or disallow some resources, but that cannot be communicated with the browser.  The browser would then act as if the plugin didn't exist for that one stream.
** Q: would this make sense on 'refresh' for a stream the plugin already accepted?


= Compatibility =
= Compatibility =


Since both these routines can return errors currently, there shouldn't be any check necessary to see if the browser handles this specific error in the right way.  The plugin should expect that any browser that does not support this specific error will behave as they currently do on errors (which for the most part is showing either a blank area or a "plugin failure" message).
Since both these routines can return errors currently, there shouldn't be any check necessary to see if the browser handles this specific error in the right way.  The plugin should expect that any browser that does not support this specific error will behave as they currently do on errors (which for the most part is showing either a blank area or a "plugin failure" message).
13

edits

Navigation menu