Resurrect --disable-oji
Bug #197924 r=peterl sr=alecf git-svn-id: svn://10.0.0.236/trunk@140220 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -83,11 +83,13 @@ NPP_Initialize(void)
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
#ifdef OJI
|
||||
jref
|
||||
NPP_GetJavaClass()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
NPP_Shutdown(void)
|
||||
|
||||
@@ -190,6 +190,7 @@ void NPN_ReloadPlugins(NPBool reloadPages)
|
||||
CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
|
||||
}
|
||||
|
||||
#ifdef OJI
|
||||
JRIEnv* NPN_GetJavaEnv()
|
||||
{
|
||||
return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
|
||||
@@ -200,6 +201,7 @@ jref NPN_GetJavaPeer(NPP instance)
|
||||
return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
|
||||
instance);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
|
||||
@@ -324,6 +326,7 @@ Private_Print(NPP instance, NPPrint* platformPrint)
|
||||
NPP_Print(instance, platformPrint);
|
||||
}
|
||||
|
||||
#ifdef OJI
|
||||
JRIGlobalRef
|
||||
Private_GetJavaClass(void)
|
||||
{
|
||||
@@ -334,6 +337,7 @@ Private_GetJavaClass(void)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -436,8 +440,10 @@ 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;
|
||||
|
||||
/*
|
||||
@@ -459,7 +465,9 @@ 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
|
||||
|
||||
err = NPP_Initialize();
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <windows.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
@@ -321,7 +322,9 @@ 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
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
//\\// GLOBAL DATA
|
||||
NPNetscapeFuncs* g_pNavigatorFuncs = 0;
|
||||
#ifdef OJI
|
||||
JRIGlobalRef Private_GetJavaClass(void);
|
||||
|
||||
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
|
||||
@@ -68,7 +69,7 @@ Private_GetJavaClass(void)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* OJI */
|
||||
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
|
||||
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
|
||||
// PLUGIN DLL entry points
|
||||
@@ -143,11 +144,11 @@ 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();
|
||||
}
|
||||
|
||||
#endif
|
||||
// NPP_Initialize is a standard (cross-platform) initialize function.
|
||||
return NPP_Initialize();
|
||||
}
|
||||
@@ -336,7 +337,7 @@ void NPN_MemFree(void* ptr)
|
||||
{
|
||||
g_pNavigatorFuncs->memfree(ptr);
|
||||
}
|
||||
|
||||
#ifdef OJI
|
||||
/* private function to Netscape. do not use!
|
||||
*/
|
||||
void NPN_ReloadPlugins(NPBool reloadPages)
|
||||
@@ -353,4 +354,5 @@ jref NPN_GetJavaPeer(NPP instance)
|
||||
{
|
||||
return g_pNavigatorFuncs->getJavaPeer(instance);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
@@ -474,12 +475,16 @@ 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");
|
||||
|
||||
Reference in New Issue
Block a user