зеркало из https://github.com/mozilla/gecko-dev.git
Changes to bring plugin code inline with various superclass changes and environment changes causal
This commit is contained in:
Родитель
478d014576
Коммит
a7008a7371
Двоичные данные
plugin/oji/MRJ/plugin/MRJInABox.mcp
Двоичные данные
plugin/oji/MRJ/plugin/MRJInABox.mcp
Двоичный файл не отображается.
|
@ -655,6 +655,19 @@ public:
|
|||
NS_IMETHOD
|
||||
GetAttribute(const char* name, const char* *result);
|
||||
|
||||
/**
|
||||
* Returns the DOM element corresponding to the tag which references
|
||||
* this plugin in the document.
|
||||
*
|
||||
* REMIND: do we need to expose as an nsISupports * to avoid
|
||||
* introducing runtime dependencies on XPCOM?
|
||||
*
|
||||
* @param result - resulting DOM element
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetDOMElement(nsIDOMElement* *result);
|
||||
|
||||
/**
|
||||
* Returns a JRI env corresponding to the current Java thread of the
|
||||
* browser.
|
||||
|
@ -1145,8 +1158,10 @@ NPP_New(NPMIMEType pluginType,
|
|||
// XXX - Since np_instance is not implemented in the 4.0x browser, I
|
||||
// XXX - had to save the plugin parameter in the peer class.
|
||||
// XXX - Ask Warren about np_instance.
|
||||
CPluginInstancePeer* peer = new CPluginInstancePeer(pluginInstance, instance, (nsMIMEType)pluginType,
|
||||
(nsPluginMode)mode, (PRUint16)argc, (const char** )argn, (const char** )argv);
|
||||
CPluginInstancePeer* peer = new CPluginInstancePeer(pluginInstance, instance,
|
||||
(nsMIMEType)pluginType,
|
||||
(nsPluginMode)mode, (PRUint16)argc,
|
||||
(const char** )argn, (const char** )argv);
|
||||
assert( peer != NULL );
|
||||
if (!peer) return NPERR_OUT_OF_MEMORY_ERROR;
|
||||
peer->AddRef();
|
||||
|
@ -2180,6 +2195,24 @@ CPluginInstancePeer::GetAttribute(const char* name, const char* *result)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the DOM element corresponding to the tag which references
|
||||
* this plugin in the document.
|
||||
*
|
||||
* REMIND: do we need to expose as an nsISupports * to avoid
|
||||
* introducing runtime dependencies on XPCOM?
|
||||
*
|
||||
* @param result - resulting DOM element
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_METHOD
|
||||
CPluginInstancePeer::GetDOMElement(nsIDOMElement* *result)
|
||||
{
|
||||
/** PENDING **/
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// NewStream:
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "nsIPluginStreamListener.h"
|
||||
|
||||
#ifndef JNI_H
|
||||
#include <jni.h>
|
||||
#include "jni.h"
|
||||
#endif
|
||||
|
||||
class MRJMonitor;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "nsError.h"
|
||||
|
||||
#include <jni.h>
|
||||
#include "jni.h"
|
||||
|
||||
class MRJPlugin;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "nsIEventHandler.h"
|
||||
#include "SupportsMixin.h"
|
||||
|
||||
#include <jni.h>
|
||||
#include "jni.h"
|
||||
#include <JManager.h>
|
||||
|
||||
class MRJPlugin;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "Monitor.h"
|
||||
|
||||
#ifndef JNI_H
|
||||
#include <jni.h>
|
||||
#include "jni.h"
|
||||
#endif
|
||||
|
||||
class MRJSession;
|
||||
|
|
|
@ -503,13 +503,17 @@ MRJPluginInstance* MRJPlugin::getPluginInstance(JNIEnv* jenv)
|
|||
|
||||
Boolean MRJPlugin::inPluginThread()
|
||||
{
|
||||
Boolean result = false;
|
||||
nsPluginThread *currentThreadID = -1;
|
||||
Boolean result = false;
|
||||
nsPluginThread *currentThreadID = NULL;
|
||||
|
||||
if (mThreadManager != NULL)
|
||||
mThreadManager->GetCurrentThread(¤tThreadID);
|
||||
if ((NULL != currentThreadID) && (NULL != mPluginThreadID)) {
|
||||
result = (*mPluginThreadID == *currentThreadID);
|
||||
if (currentThreadID == mPluginThreadID) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче