removed NEW_PLUGIN_STREAM_API #ifdefs, conformed to latest nsIPluginStreamListener interface.

This commit is contained in:
beard%netscape.com 1999-03-12 03:55:42 +00:00
Родитель 02f2d3d6e9
Коммит 0a662b0b79
2 изменённых файлов: 32 добавлений и 46 удалений

Просмотреть файл

@ -235,6 +235,16 @@ NS_METHOD MRJPlugin::GetMIMEDescription(const char* *result)
return NS_OK;
}
NS_METHOD MRJPlugin::GetValue(nsPluginVariable variable, void *value)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_METHOD MRJPlugin::SetValue(nsPluginVariable variable, void *value)
{
return NS_ERROR_FAILURE;
}
MRJSession* MRJPlugin::getSession()
{
StartupJVM();
@ -518,7 +528,7 @@ NS_METHOD MRJPluginInstance::Initialize(nsIPluginInstancePeer* peer)
// create a context for the applet we will run.
mContext = new MRJContext(mSession, this);
if (mWindowlessPeer != NULL) {
if (thePluginManager2 != NULL) {
mContext->processAppletTag();
mContext->createContext();
} else {
@ -532,8 +542,7 @@ NS_METHOD MRJPluginInstance::Initialize(nsIPluginInstancePeer* peer)
return NS_OK;
}
NS_METHOD MRJPluginInstance::OnDataAvailable(const char* url, nsIInputStream* input,
PRUint32 offset, PRUint32 length, nsIPluginStreamInfo* pluginInfo)
NS_METHOD MRJPluginInstance::OnDataAvailable(nsIPluginStreamInfo* pluginInfo, nsIInputStream* input, PRUint32 length)
{
// hopefully all our data is available.
char* codeBase = new char[length + 1];
@ -679,6 +688,19 @@ NS_METHOD MRJPluginInstance::HandleEvent(nsPluginEvent* pluginEvent, PRBool* eve
return NS_OK;
}
NS_METHOD MRJPluginInstance::GetValue(nsPluginInstanceVariable variable, void *value)
{
switch (variable) {
case nsPluginInstanceVariable_WindowlessBool:
*(PRBool*)value = PR_FALSE;
break;
case nsPluginInstanceVariable_TransparentBool:
*(PRBool*)value = PR_FALSE;
break;
}
return NS_OK;
}
NS_METHOD MRJPluginInstance::GetJavaObject(jobject *result)
{
if (mApplet == NULL) {

Просмотреть файл

@ -127,17 +127,11 @@ public:
* @result - NS_OK if this operation was successful
*/
NS_IMETHOD
GetValue(nsPluginVariable variable, void *value)
{
return NS_ERROR_FAILURE;
}
GetValue(nsPluginVariable variable, void *value);
// (Corresponds to NPP_SetValue.)
NS_IMETHOD
SetValue(nsPluginVariable variable, void *value)
{
return NS_ERROR_FAILURE;
}
SetValue(nsPluginVariable variable, void *value);
// JVM Plugin Methods.
@ -318,7 +312,6 @@ public:
NS_IMETHOD
SetWindow(nsPluginWindow* window);
#ifdef NEW_PLUGIN_STREAM_API
/**
* Called to tell the plugin that the initial src/data stream is
* ready. Expects the plugin to return a nsIPluginStreamListener.
@ -335,25 +328,6 @@ public:
AddRef();
return NS_OK;
}
#else
/**
* Called when a new plugin stream must be constructed in order for the plugin
* instance to receive a stream of data from the browser.
*
* (Corresponds to NPP_NewStream.)
*
* @param peer - the plugin stream peer, representing information about the
* incoming stream, and stream-specific callbacks into the browser
* @param result - the resulting plugin stream
* @result - NS_OK if this operation was successful
*/
NS_IMETHOD
NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result)
{
*result = NULL;
return NS_ERROR_NOT_IMPLEMENTED;
}
#endif
// (Corresponds to NPP_Print.)
NS_IMETHOD
@ -378,10 +352,7 @@ public:
* @result - NS_OK if this operation was successful
*/
NS_IMETHOD
GetValue(nsPluginInstanceVariable variable, void *value)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
GetValue(nsPluginInstanceVariable variable, void *value);
// nsIJVMPluginInstance methods.
@ -407,7 +378,7 @@ public:
* used to cancel the URL load..
*/
NS_IMETHOD
OnStartBinding(const char* url, nsIPluginStreamInfo* pluginInfo)
OnStartBinding(nsIPluginStreamInfo* pluginInfo)
{
return NS_OK;
}
@ -423,11 +394,10 @@ public:
* @return The return value is currently ignored.
*/
NS_IMETHOD
OnDataAvailable(const char* url, nsIInputStream* input,
PRUint32 offset, PRUint32 length, nsIPluginStreamInfo* pluginInfo);
OnDataAvailable(nsIPluginStreamInfo* pluginInfo, nsIInputStream* input, PRUint32 length);
NS_IMETHOD
OnFileAvailable(const char* url, const char* fileName)
OnFileAvailable(nsIPluginStreamInfo* pluginInfo, const char* fileName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -444,13 +414,7 @@ public:
* @return The return value is currently ignored.
*/
NS_IMETHOD
OnStopBinding(const char* url, nsresult status, nsIPluginStreamInfo* pluginInfo)
{
return NS_OK;
}
NS_IMETHOD
OnNotify(const char* url, nsresult status)
OnStopBinding(nsIPluginStreamInfo* pluginInfo, nsresult status)
{
return NS_OK;
}