Landing part of the fix for bug 435334. Remove Java specific code that does nobody any good in our samples. r=joshmoz@gmail.com, sr=jonas@sicking.cc

This commit is contained in:
Johnny Stenback 2008-07-11 14:24:43 -07:00
parent f98d5014e5
commit 24d6f11d19
53 changed files with 47 additions and 492 deletions

View File

@ -102,8 +102,8 @@ NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs)
NPNFuncs.memfree = pFuncs->memfree;
NPNFuncs.memflush = pFuncs->memflush;
NPNFuncs.reloadplugins = pFuncs->reloadplugins;
NPNFuncs.getJavaEnv = pFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = pFuncs->getJavaPeer;
NPNFuncs.getJavaEnv = NULL;
NPNFuncs.getJavaPeer = NULL;
NPNFuncs.getvalue = pFuncs->getvalue;
NPNFuncs.setvalue = pFuncs->setvalue;
NPNFuncs.invalidaterect = pFuncs->invalidaterect;

View File

@ -63,7 +63,6 @@
#define ExitCodeResource()
#endif
#include "jri.h"
#include "npapi.h"
//
@ -295,16 +294,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
}
JRIEnv* NPN_GetJavaEnv(void)
{
return CallNPN_GetJavaEnvProc( gNetscapeFuncs.getJavaEnv );
}
jref NPN_GetJavaPeer(NPP instance)
{
return CallNPN_GetJavaPeerProc( gNetscapeFuncs.getJavaPeer, instance );
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
return CallNPN_GetValueProc( gNetscapeFuncs.getvalue, instance, variable, value);
@ -353,7 +342,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
void Private_Print(NPP instance, NPPrint* platformPrint);
int16 Private_HandleEvent(NPP instance, void* event);
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
jref Private_GetJavaClass(void);
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result);
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value);
@ -485,21 +473,6 @@ void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* not
}
jref Private_GetJavaClass(void)
{
EnterCodeResource();
PLUGINDEBUGSTR("\pGetJavaClass;g;");
jref clazz = NPP_GetJavaClass();
ExitCodeResource();
if (clazz)
{
JRIEnv* env = NPN_GetJavaEnv();
return (jref)JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result)
{
NPError err;
@ -678,8 +651,8 @@ NPError main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownU
gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
{
gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv;
gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
gNetscapeFuncs.getJavaEnv = NULL;
gNetscapeFuncs.getJavaPeer = NULL;
}
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{
@ -718,7 +691,7 @@ NPError main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownU
}
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
{
pluginFuncs->javaClass = (JRIGlobalRef) Private_GetJavaClass();
pluginFuncs->javaClass = NULL;
pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
}

View File

@ -171,20 +171,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
NPNFuncs.reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
JRIEnv * rv = NULL;
rv = NPNFuncs.getJavaEnv();
return rv;
}
jref NPN_GetJavaPeer(NPP instance)
{
jref rv;
rv = NPNFuncs.getJavaPeer(instance);
return rv;
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
NPError rv = NPNFuncs.getvalue(instance, variable, value);

View File

@ -142,7 +142,7 @@ NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow)
// nsScriptablePeer interface which we should have implemented
// and which should be defined in the corressponding *.xpt file
// in the bin/components folder
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
{
if(instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
@ -246,7 +246,7 @@ NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
return rv;
}
int16 NPP_HandleEvent(NPP instance, void* event)
int16 NPP_HandleEvent(NPP instance, void* event)
{
if(instance == NULL)
return 0;
@ -258,8 +258,3 @@ int16 NPP_HandleEvent(NPP instance, void* event)
return rv;
}
jref NPP_GetJavaClass (void)
{
return NULL;
}

View File

@ -293,14 +293,6 @@ void NPP_URLNotify(NPP /*instance*/, const char* /*url*/, NPReason /*reason*/, v
}
#ifdef OJI
jref NPP_GetJavaClass(void)
{
return NULL;
}
#endif /* OJI */
NPError CPlugin::Initialize()
{
Handle string;

View File

@ -266,18 +266,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
}
#ifdef OJI
JRIEnv* NPN_GetJavaEnv(void)
{
return CallNPN_GetJavaEnvProc( gNetscapeFuncs.getJavaEnv );
}
jobject NPN_GetJavaPeer(NPP instance)
{
return CallNPN_GetJavaPeerProc( gNetscapeFuncs.getJavaPeer, instance );
}
#endif
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
return CallNPN_GetValueProc( gNetscapeFuncs.getvalue, instance, variable, value);
@ -338,7 +326,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
void Private_Print(NPP instance, NPPrint* platformPrint);
int16 Private_HandleEvent(NPP instance, void* event);
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
jobject Private_GetJavaClass(void);
NPError Private_Initialize(void)
@ -421,21 +408,6 @@ void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* not
NPP_URLNotify(instance, url, reason, notifyData);
}
#ifdef OJI
jobject Private_GetJavaClass(void)
{
PLUGINDEBUGSTR("\pGetJavaClass;g;");
jobject clazz = NPP_GetJavaClass();
if (clazz)
{
JRIEnv* env = NPN_GetJavaEnv();
return (jobject)JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif
void SetUpQD(void);
void SetUpQD(void)
{
@ -503,8 +475,8 @@ DEFINE_API_C(int) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP
gNetscapeFuncs.reloadplugins = (NPN_ReloadPluginsUPP)HOST_TO_PLUGIN_GLUE(reloadplugins, nsTable->reloadplugins);
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
{
gNetscapeFuncs.getJavaEnv = (NPN_GetJavaEnvUPP)HOST_TO_PLUGIN_GLUE(getJavaEnv, nsTable->getJavaEnv);
gNetscapeFuncs.getJavaPeer = (NPN_GetJavaPeerUPP)HOST_TO_PLUGIN_GLUE(getJavaPeer, nsTable->getJavaPeer);
gNetscapeFuncs.getJavaEnv = NULL;
gNetscapeFuncs.getJavaPeer = NULL;
}
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{
@ -540,14 +512,10 @@ DEFINE_API_C(int) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP
{
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
{
pluginFuncs->javaClass = (JRIGlobalRef) Private_GetJavaClass();
pluginFuncs->javaClass = NULL;
}
#else
pluginFuncs->javaClass = NULL;
#endif
*unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown));
SetUpQD();

View File

@ -116,7 +116,7 @@ static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, MPARAM mParam)
return TRUE;
}
if((!pPlugin->m_bJava) || (!pPlugin->m_bJavaScript) || (!pPlugin->m_bSmartUpdate))
if((!pPlugin->m_bJavaScript) || (!pPlugin->m_bSmartUpdate))
{
WinLoadString((HAB)0, hInst, IDS_WARNING_JS, sizeof(szString), szString);
WinSetDlgItemText(hWnd, IDC_STATIC_WARNING, szString);

View File

@ -51,27 +51,7 @@
//\\// GLOBAL DATA
NPNetscapeFuncs* g_pNavigatorFuncs = 0;
#ifdef OJI
JRIGlobalRef Private_GetJavaClass(void);
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// Private_GetJavaClass (global function)
//
// Given a Java class reference (thru NPP_GetJavaClass) inform JRT
// of this class existence
//
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif /* OJI */
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// PLUGIN DLL entry points
@ -146,11 +126,9 @@ NP_Initialize(NPNetscapeFuncs* pFuncs)
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {
g_pluginFuncs->urlnotify = NPP_URLNotify;
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) {
g_pluginFuncs->javaClass = Private_GetJavaClass();
g_pluginFuncs->javaClass = NULL;
}
#endif
// NPP_Initialize is a standard (cross-platform) initialize function.
return NPP_Initialize();
}
@ -339,22 +317,9 @@ void NPN_MemFree(void* ptr)
{
g_pNavigatorFuncs->memfree(ptr);
}
#ifdef OJI
/* private function to Netscape. do not use!
*/
void NPN_ReloadPlugins(NPBool reloadPages)
{
g_pNavigatorFuncs->reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
return g_pNavigatorFuncs->getJavaEnv();
}
jref NPN_GetJavaPeer(NPP instance)
{
return g_pNavigatorFuncs->getJavaPeer(instance);
}
#endif

View File

@ -328,10 +328,3 @@ void NP_LOADDS NPP_URLNotify(NPP pInstance, const char* url, NPReason reason, vo
pPlugin->URLNotify(url);
}
#ifdef OJI
jref NP_LOADDS NPP_GetJavaClass(void)
{
return NULL;
}
#endif

View File

@ -104,7 +104,6 @@ CPlugin::CPlugin(HMODULE hInst,
m_szFileExtension(NULL),
m_hWndDialog(NULL),
m_bOnline(TRUE),
m_bJava(TRUE),
m_bJavaScript(TRUE),
m_bSmartUpdate(TRUE)
{
@ -304,7 +303,7 @@ BOOL CPlugin::doSmartUpdate_P()
// due to current JavaScript problems never do it smart for now 5.1.98
return FALSE;
if(m_bOnline && m_bJava && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P())
if(m_bOnline && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P())
return TRUE;
else
return FALSE;
@ -466,19 +465,8 @@ void CPlugin::showGetPluginDialog()
m_bOnline = !bOffline;
#ifdef OJI
if(m_bOnline && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P())
{
JRIEnv *penv = NPN_GetJavaEnv();
m_bJava = (penv != NULL);
}
#else
m_bJava = FALSE;
#endif
dbgOut1("Environment:");
dbgOut2("%s", m_bOnline ? "On-line" : "Off-line");
dbgOut2("Java %s", m_bJava ? "Enabled" : "Disabled");
dbgOut2("JavaScript %s", m_bJavaScript ? "Enabled" : "Disabled");
dbgOut2("SmartUpdate %s", m_bSmartUpdate ? "Enabled" : "Disabled");

View File

@ -65,7 +65,6 @@ public:
// environment
BOOL m_bOnline;
BOOL m_bJava;
BOOL m_bJavaScript;
BOOL m_bSmartUpdate;

View File

@ -99,14 +99,6 @@ NPP_Initialize(void)
return NPERR_NO_ERROR;
}
#ifdef OJI
jref
NPP_GetJavaClass()
{
return NULL;
}
#endif
void
NPP_Shutdown(void)
{

View File

@ -206,19 +206,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
}
#ifdef OJI
JRIEnv* NPN_GetJavaEnv()
{
return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
}
jref NPN_GetJavaPeer(NPP instance)
{
return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
instance);
}
#endif
void
NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
{
@ -465,19 +452,6 @@ Private_Print(NPP instance, NPPrint* platformPrint)
NPP_Print(instance, platformPrint);
}
#ifdef OJI
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif
/***********************************************************************
*
* These functions are located automagically by netscape.
@ -579,10 +553,6 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
gNetscapeFuncs.memfree = nsTable->memfree;
gNetscapeFuncs.memflush = nsTable->memflush;
gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
#ifdef OJI
gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv;
gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
#endif
gNetscapeFuncs.getvalue = nsTable->getvalue;
gNetscapeFuncs.setvalue = nsTable->setvalue;
gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
@ -667,9 +637,8 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
pluginFuncs->print = NewNPP_PrintProc(Private_Print);
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
pluginFuncs->event = NULL;
#ifdef OJI
pluginFuncs->javaClass = Private_GetJavaClass();
#endif
pluginFuncs->javaClass = NULL;
// This function is supposedly loaded magically, but that doesn't
// seem to be true.
pluginFuncs->getvalue = NewNPP_GetValueProc(NP_GetValue);

View File

@ -119,7 +119,7 @@ static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
return TRUE;
}
if((!pPlugin->m_bJava) || (!pPlugin->m_bJavaScript) || (!pPlugin->m_bSmartUpdate))
if((!pPlugin->m_bJavaScript) || (!pPlugin->m_bSmartUpdate))
{
LoadString(hInst, IDS_WARNING_JS, szString, sizeof(szString));
SetDlgItemText(hWnd, IDC_STATIC_WARNING, szString);

View File

@ -327,10 +327,3 @@ void NP_LOADDS NPP_URLNotify(NPP pInstance, const char* url, NPReason reason, vo
pPlugin->URLNotify(url);
}
#ifdef OJI
jref NP_LOADDS NPP_GetJavaClass(void)
{
return NULL;
}
#endif

View File

@ -49,27 +49,6 @@
//\\// GLOBAL DATA
NPNetscapeFuncs* g_pNavigatorFuncs = 0;
#ifdef OJI
JRIGlobalRef Private_GetJavaClass(void);
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// Private_GetJavaClass (global function)
//
// Given a Java class reference (thru NPP_GetJavaClass) inform JRT
// of this class existence
//
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif /* OJI */
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// PLUGIN DLL entry points
@ -144,11 +123,9 @@ NP_Initialize(NPNetscapeFuncs* pFuncs)
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {
g_pluginFuncs->urlnotify = NPP_URLNotify;
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) {
g_pluginFuncs->javaClass = Private_GetJavaClass();
g_pluginFuncs->javaClass = NULL;
}
#endif
// NPP_Initialize is a standard (cross-platform) initialize function.
return NPP_Initialize();
}
@ -337,22 +314,3 @@ void NPN_MemFree(void* ptr)
{
g_pNavigatorFuncs->memfree(ptr);
}
#ifdef OJI
/* private function to Netscape. do not use!
*/
void NPN_ReloadPlugins(NPBool reloadPages)
{
g_pNavigatorFuncs->reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
return g_pNavigatorFuncs->getJavaEnv();
}
jref NPN_GetJavaPeer(NPP instance)
{
return g_pNavigatorFuncs->getJavaPeer(instance);
}
#endif

View File

@ -114,7 +114,6 @@ CPlugin::CPlugin(HINSTANCE hInst,
m_szFileURL(NULL),
m_szFileExtension(NULL),
m_bOnline(TRUE),
m_bJava(TRUE),
m_bJavaScript(TRUE),
m_bSmartUpdate(TRUE),
m_szURLString(NULL),
@ -315,7 +314,7 @@ BOOL CPlugin::doSmartUpdate_P()
// due to current JavaScript problems never do it smart for now 5.1.98
return FALSE;
if(m_bOnline && m_bJava && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P())
if(m_bOnline && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P())
return TRUE;
else
return FALSE;
@ -477,19 +476,8 @@ void CPlugin::showGetPluginDialog()
m_bOnline = !bOffline;
#ifdef OJI
if(m_bOnline && m_bJavaScript && m_bSmartUpdate && useDefaultURL_P())
{
JRIEnv *penv = NPN_GetJavaEnv();
m_bJava = (penv != NULL);
}
#else
m_bJava = FALSE;
#endif
dbgOut1("Environment:");
dbgOut2("%s", m_bOnline ? "On-line" : "Off-line");
dbgOut2("Java %s", m_bJava ? "Enabled" : "Disabled");
dbgOut2("JavaScript %s", m_bJavaScript ? "Enabled" : "Disabled");
dbgOut2("SmartUpdate %s", m_bSmartUpdate ? "Enabled" : "Disabled");

View File

@ -65,7 +65,6 @@ public:
// environment
BOOL m_bOnline;
BOOL m_bJava;
BOOL m_bJavaScript;
BOOL m_bSmartUpdate;

View File

@ -47,7 +47,6 @@ CPPSRCS = \
REQUIRES = \
plugin \
java \
$(NULL)
LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public \

View File

@ -125,8 +125,8 @@ NP_Initialize(NPNetscapeFuncs* pFuncs
NPNFuncs.memfree = pFuncs->memfree;
NPNFuncs.memflush = pFuncs->memflush;
NPNFuncs.reloadplugins = pFuncs->reloadplugins;
NPNFuncs.getJavaEnv = pFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = pFuncs->getJavaPeer;
NPNFuncs.getJavaEnv = NULL;
NPNFuncs.getJavaPeer = NULL;
NPNFuncs.getvalue = pFuncs->getvalue;
NPNFuncs.setvalue = pFuncs->setvalue;
NPNFuncs.invalidaterect = pFuncs->invalidaterect;
@ -173,9 +173,7 @@ NP_Initialize(NPNetscapeFuncs* pFuncs
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(NPP_URLNotify);
pluginFuncs->event = NULL;
pluginFuncs->getvalue = NewNPP_GetValueProc(NPP_GetValue);
#ifdef OJI
pluginFuncs->javaClass = NPP_GetJavaClass();
#endif
pluginFuncs->javaClass = NULL;
NPP_Initialize();
#endif

View File

@ -179,20 +179,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
NPNFuncs.reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
JRIEnv * rv = NULL;
rv = NPNFuncs.getJavaEnv();
return rv;
}
jref NPN_GetJavaPeer(NPP instance)
{
jref rv;
rv = NPNFuncs.getJavaPeer(instance);
return rv;
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
NPError rv = NPNFuncs.getvalue(instance, variable, value);

View File

@ -261,11 +261,6 @@ int16 NPP_HandleEvent(NPP instance, void* event)
return rv;
}
jref NPP_GetJavaClass (void)
{
return NULL;
}
NPObject *NPP_GetScriptableInstance(NPP instance)
{
if(!instance)

View File

@ -99,8 +99,8 @@ NPError WINAPI NP_Initialize(NPNetscapeFuncs* aNetscapeFuncs)
NPNFuncs.memfree = aNetscapeFuncs->memfree;
NPNFuncs.memflush = aNetscapeFuncs->memflush;
NPNFuncs.reloadplugins = aNetscapeFuncs->reloadplugins;
NPNFuncs.getJavaEnv = aNetscapeFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = aNetscapeFuncs->getJavaPeer;
NPNFuncs.getJavaEnv = NULL;
NPNFuncs.getJavaPeer = NULL;
NPNFuncs.getvalue = aNetscapeFuncs->getvalue;
NPNFuncs.setvalue = aNetscapeFuncs->setvalue;
NPNFuncs.invalidaterect = aNetscapeFuncs->invalidaterect;

View File

@ -202,24 +202,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
NPNFuncs.reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
dbgOut1("wrapper: NPN_GetJavaEnv");
JRIEnv * rv = NULL;
rv = NPNFuncs.getJavaEnv();
return rv;
}
jref NPN_GetJavaPeer(NPP instance)
{
dbgOut1("wrapper: NPN_GetJavaPeer");
jref rv;
rv = NPNFuncs.getJavaPeer(instance);
return rv;
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
dbgOut1("wrapper: NPN_GetValue");

View File

@ -44,13 +44,6 @@
nsPluginThread * thePluginThread = NULL;
jref NPP_GetJavaClass ()
{
dbgOut1("wrapper: NPP_GetJavaClass");
jref rv = (jref)thePluginThread->callNPP(action_npp_get_java_class);
return NULL;
}
NPError NPP_New(NPMIMEType aType,
NPP aInstance,
uint16 aMode,

View File

@ -121,8 +121,8 @@ BOOL nsPluginThread::init()
wrapperNPNFuncs.memfree = NPN_MemFree;
wrapperNPNFuncs.memflush = NPN_MemFlush;
wrapperNPNFuncs.reloadplugins = NPN_ReloadPlugins;
wrapperNPNFuncs.getJavaEnv = NPN_GetJavaEnv;
wrapperNPNFuncs.getJavaPeer = NPN_GetJavaPeer;
wrapperNPNFuncs.getJavaEnv = NULL;
wrapperNPNFuncs.getJavaPeer = NULL;
wrapperNPNFuncs.getvalue = NPN_GetValue;
wrapperNPNFuncs.setvalue = NPN_SetValue;
wrapperNPNFuncs.invalidaterect = NPN_InvalidateRect;
@ -217,7 +217,7 @@ void nsPluginThread::dispatch()
pluginNPPFuncs.urlnotify((NPP)mP1, (const char*)mP2, (NPReason)mP3, (void*)mP4);
break;
case action_npp_get_java_class:
//pluginNPPFuncs.javaClass;
// Deprecated action
break;
case action_npp_get_value:
pluginNPPFuncs.getvalue((NPP)mP1, (NPPVariable)mP2, (void *)mP3);

View File

@ -99,14 +99,6 @@ NPP_Initialize(void)
return NPERR_NO_ERROR;
}
#ifdef OJI
jref
NPP_GetJavaClass()
{
return NULL;
}
#endif
void
NPP_Shutdown(void)
{

View File

@ -206,19 +206,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
}
#ifdef OJI
JRIEnv* NPN_GetJavaEnv()
{
return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
}
jref NPN_GetJavaPeer(NPP instance)
{
return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
instance);
}
#endif
void
NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
{
@ -354,19 +341,6 @@ Private_Print(NPP instance, NPPrint* platformPrint)
NPP_Print(instance, platformPrint);
}
#ifdef OJI
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif
/***********************************************************************
*
* These functions are located automagically by netscape.
@ -468,10 +442,8 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
gNetscapeFuncs.memfree = nsTable->memfree;
gNetscapeFuncs.memflush = nsTable->memflush;
gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
#ifdef OJI
gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv;
gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
#endif
gNetscapeFuncs.getJavaEnv = NULL;
gNetscapeFuncs.getJavaPeer = NULL;
gNetscapeFuncs.getvalue = nsTable->getvalue;
gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
gNetscapeFuncs.poppopupsenabledstate = nsTable->poppopupsenabledstate;
@ -495,9 +467,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
pluginFuncs->print = NewNPP_PrintProc(Private_Print);
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
pluginFuncs->event = NULL;
#ifdef OJI
pluginFuncs->javaClass = Private_GetJavaClass();
#endif
pluginFuncs->javaClass = NULL;
err = NPP_Initialize();
}

View File

@ -44,8 +44,7 @@ include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = npSDKbasic
REQUIRES = java \
idl \
REQUIRES = idl \
xpcom \
nspr \
$(NULL)

View File

@ -48,7 +48,6 @@ LIBRARY_NAME = npbasic
NO_DIST_INSTALL = 1
REQUIRES = plugin \
java \
$(NULL)
CPPSRCS = plugin.cpp

View File

@ -47,7 +47,6 @@ LIBRARY_NAME = plugingate_s
NO_DIST_INSTALL = 1
REQUIRES = plugin \
java \
$(NULL)
CPPSRCS = npn_gate.cpp \

View File

@ -90,9 +90,6 @@ static NPError fillPluginFunctionTable(NPPluginFuncs* aNPPFuncs)
aNPPFuncs->getvalue = NPP_GetValue;
aNPPFuncs->setvalue = NPP_SetValue;
#endif
#ifdef OJI
aNPPFuncs->javaClass = NULL;
#endif
return NPERR_NO_ERROR;
}
@ -124,10 +121,6 @@ static NPError fillNetscapeFunctionTable(NPNetscapeFuncs* aNPNFuncs)
NPNFuncs.memfree = aNPNFuncs->memfree;
NPNFuncs.memflush = aNPNFuncs->memflush;
NPNFuncs.reloadplugins = aNPNFuncs->reloadplugins;
#ifdef OJI
NPNFuncs.getJavaEnv = aNPNFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = aNPNFuncs->getJavaPeer;
#endif
NPNFuncs.getvalue = aNPNFuncs->getvalue;
NPNFuncs.setvalue = aNPNFuncs->setvalue;
NPNFuncs.invalidaterect = aNPNFuncs->invalidaterect;

View File

@ -171,22 +171,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
CallNPN_ReloadPluginsProc(NPNFuncs.reloadplugins, reloadPages);
}
#ifdef OJI
JRIEnv* NPN_GetJavaEnv(void)
{
JRIEnv * rv = NULL;
rv = CallNPN_GetJavaEnvProc(NPNFuncs.getJavaEnv);
return rv;
}
jref NPN_GetJavaPeer(NPP instance)
{
jref rv;
rv = CallNPN_GetJavaPeerProc(NPNFuncs.getJavaPeer, instance);
return rv;
}
#endif
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
NPError rv = CallNPN_GetValueProc(NPNFuncs.getvalue, instance, variable, value);

View File

@ -257,13 +257,6 @@ int16 NPP_HandleEvent(NPP instance, void* event)
return rv;
}
#ifdef OJI
jref NPP_GetJavaClass (void)
{
return NULL;
}
#endif
/**************************************************/
/* */
/* Mac */
@ -338,11 +331,6 @@ void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* not
NPP_URLNotify(instance, url, reason, notifyData);
}
jref Private_GetJavaClass(void)
{
return NULL;
}
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result)
{
NPError rv = NPP_GetValue(instance, variable, result);

View File

@ -73,8 +73,6 @@
#include <Resources.h>
#include <ToolUtils.h>
#include "jri.h"
// The Mixed Mode procInfos defined in npupp.h assume Think C-
// style calling conventions. These conventions are used by
// Metrowerks with the exception of pointer return types, which
@ -133,7 +131,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
void Private_Print(NPP instance, NPPrint* platformPrint);
int16 Private_HandleEvent(NPP instance, void* event);
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
jref Private_GetJavaClass(void);
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result);
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value);

View File

@ -45,8 +45,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = npSDKscriptable
LIBRARY_NAME = npSDKscriptable
REQUIRES = java \
idl \
REQUIRES = idl \
xpcom \
nspr \
$(NULL)

View File

@ -48,7 +48,6 @@ LIBRARY_NAME = npscriptable
NO_DIST_INSTALL = 1
REQUIRES = plugin \
java \
xpcom \
$(NULL)

View File

@ -46,7 +46,6 @@ XPIDL_MODULE = npsimple
LIBRARY_NAME = npsimple
REQUIRES = xpcom \
plugin \
java \
$(NULL)
NO_DIST_INSTALL = 1

View File

@ -48,7 +48,6 @@ LIBRARY_NAME = npwinless
NO_DIST_INSTALL = 1
REQUIRES = plugin \
java \
$(NULL)
CPPSRCS = plugin.cpp

View File

@ -112,7 +112,7 @@ void NPPEntryPointManager::createEntryPointsForPlugin(char * mimetype, NPPluginF
eps->realNPPFuncs.print = funcs->print;
eps->realNPPFuncs.event = funcs->event;
eps->realNPPFuncs.urlnotify = funcs->urlnotify;
eps->realNPPFuncs.javaClass = funcs->javaClass;
eps->realNPPFuncs.javaClass = NULL;
eps->realNPPFuncs.getvalue = funcs->getvalue;
eps->realNPPFuncs.setvalue = funcs->setvalue;
}

View File

@ -133,8 +133,8 @@ NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs)
NPNFuncs.memfree = pFuncs->memfree;
NPNFuncs.memflush = pFuncs->memflush;
NPNFuncs.reloadplugins = pFuncs->reloadplugins;
NPNFuncs.getJavaEnv = pFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = pFuncs->getJavaPeer;
NPNFuncs.getJavaEnv = NULL;
NPNFuncs.getJavaPeer = NULL;
NPNFuncs.getvalue = pFuncs->getvalue;
NPNFuncs.setvalue = pFuncs->setvalue;
NPNFuncs.invalidaterect = pFuncs->invalidaterect;

View File

@ -265,36 +265,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
NPNFuncs.reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
JRIEnv * rv = NULL;
if(logger)
logger->logCall(action_npn_get_java_env);
rv = NPNFuncs.getJavaEnv();
if(logger)
logger->logReturn();
return rv;
}
jref NPN_GetJavaPeer(NPP instance)
{
jref rv;
if(logger)
logger->logCall(action_npn_get_java_peer, (DWORD)instance);
rv = NPNFuncs.getJavaPeer(instance);
if(logger)
logger->logReturn();
return rv;
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
NPError rv = NPERR_NO_ERROR;

View File

@ -48,16 +48,6 @@ NPNetscapeFuncs fakeNPNFuncs;
extern NPPEntryPointManager * epManager;
jref NPP_GetJavaClass (void)
{
if(logger)
logger->logCall(action_npp_get_java_class);
if(logger)
logger->logReturn();
return NULL;
}
NPError NPP_New(NPMIMEType pluginType,
NPP instance,
uint16 mode,
@ -133,8 +123,8 @@ NPError NPP_New(NPMIMEType pluginType,
fakeNPNFuncs.memfree = NPN_MemFree;
fakeNPNFuncs.memflush = NPN_MemFlush;
fakeNPNFuncs.reloadplugins = NPN_ReloadPlugins;
fakeNPNFuncs.getJavaEnv = NPN_GetJavaEnv;
fakeNPNFuncs.getJavaPeer = NPN_GetJavaPeer;
fakeNPNFuncs.getJavaEnv = NULL;
fakeNPNFuncs.getJavaPeer = NULL;
fakeNPNFuncs.getvalue = NPN_GetValue;
fakeNPNFuncs.setvalue = NPN_SetValue;
fakeNPNFuncs.invalidaterect = NPN_InvalidateRect;

View File

@ -97,7 +97,6 @@ public:
void callNPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
void callNPP_Print(NPP instance, NPPrint* platformPrint);
void callNPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
jref callNPP_GetJavaClass(void);
NPError callNPP_GetValue(NPP instance, NPPVariable variable, void *value);
NPError callNPP_SetValue(NPP instance, NPNVariable variable, void *value);
int16 callNPP_HandleEvent(NPP instance, void* event);

View File

@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\..\dist\include\plugin" /I "..\..\..\..\..\dist\include\java" /I "..\..\..\..\..\dist\include\nspr" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\..\dist\include\plugin" /I "..\..\..\..\..\dist\include\nspr" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"

View File

@ -44,8 +44,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = plugin
LIBRARY_NAME = plcommon_s
REQUIRES = java \
plugin \
REQUIRES = plugin \
$(NULL)
CPPSRCS = \

View File

@ -129,8 +129,8 @@ static NPError fillNetscapeFunctionTable(NPNetscapeFuncs* aNPNFuncs)
NPNFuncs.memfree = aNPNFuncs->memfree;
NPNFuncs.memflush = aNPNFuncs->memflush;
NPNFuncs.reloadplugins = aNPNFuncs->reloadplugins;
NPNFuncs.getJavaEnv = aNPNFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = aNPNFuncs->getJavaPeer;
NPNFuncs.getJavaEnv = NULL;
NPNFuncs.getJavaPeer = NULL;
NPNFuncs.getvalue = aNPNFuncs->getvalue;
NPNFuncs.setvalue = aNPNFuncs->setvalue;
NPNFuncs.invalidaterect = aNPNFuncs->invalidaterect;

View File

@ -193,20 +193,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
CallNPN_ReloadPluginsProc(NPNFuncs.reloadplugins, reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
JRIEnv * rv = NULL;
rv = CallNPN_GetJavaEnvProc(NPNFuncs.getJavaEnv);
return rv;
}
jref NPN_GetJavaPeer(NPP instance)
{
jref rv;
rv = CallNPN_GetJavaPeerProc(NPNFuncs.getJavaPeer, instance);
return rv;
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
NPError rv = CallNPN_GetValueProc(NPNFuncs.getvalue, instance, variable, value);

View File

@ -418,15 +418,6 @@ Return:
return ret;
}
jref NPP_GetJavaClass (void)
{
DWORD dwTickEnter = XP_GetTickCount();
DWORD dwTickReturn = XP_GetTickCount();
if(pLogger)
pLogger->appendToLog(action_npp_get_java_class, dwTickEnter, dwTickReturn, 0L);
return NULL;
}
/**************************************************/
/* */
/* Mac */
@ -523,11 +514,6 @@ void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* not
ExitCodeResource();
}
jref Private_GetJavaClass(void)
{
return NULL;
}
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result)
{
EnterCodeResource();

View File

@ -340,12 +340,12 @@ DWORD CPluginBase::makeNPNCall(NPAPI_Action action, DWORD dw1, DWORD dw2, DWORD
NPN_ReloadPlugins((NPBool)dw1);
break;
case action_npn_get_java_env:
dwRet = (DWORD)NPN_GetJavaEnv();
// Deprecated action
dwRet = NULL;
break;
case action_npn_get_java_peer:
if(dw1 == DEFAULT_DWARG_VALUE)
dw1 = (DWORD)m_pNPInstance;
dwRet = (DWORD)NPN_GetJavaPeer((NPP)dw1);
// Deprecated action
dwRet = NULL;
break;
case action_npn_get_value:
if(dw1 == DEFAULT_DWARG_VALUE)

View File

@ -127,7 +127,6 @@
//
#include <A4Stuff.h>
#include "jri.h"
#include "npapi.h"
// The Mixed Mode procInfos defined in npupp.h assume Think C-
@ -190,7 +189,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
void Private_Print(NPP instance, NPPrint* platformPrint);
int16 Private_HandleEvent(NPP instance, void* event);
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
jref Private_GetJavaClass(void);
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result);
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value);

View File

@ -46,8 +46,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = plugin
LIBRARY_NAME = npapi
RESFILE = npapi.res
REQUIRES = java \
plugin \
REQUIRES = plugin \
$(NULL)
CPPSRCS = \

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPAPI_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\..\..\..\..\dist\include" /I "..\..\..\..\..\dist\include\java" /I "..\..\..\..\..\dist\include\nspr" /I "..\..\..\..\..\dist\include\plugin" /D "XP_WIN" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPAPI_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\..\..\..\..\dist\include" /I "..\..\..\..\..\dist\include\nspr" /I "..\..\..\..\..\dist\include\plugin" /D "XP_WIN" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPAPI_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPAPI_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\..\dist\include\plugin" /I "..\..\..\..\..\dist\include\java" /I "..\..\..\..\..\dist\include\nspr" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPAPI_EXPORTS" /FR /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\..\dist\include\plugin" /I "..\..\..\..\..\dist\include\nspr" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPAPI_EXPORTS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"