added support for deferred plugin enumeration.

This commit is contained in:
michaelp%netscape.com 1998-09-30 18:57:27 +00:00
parent 10f6c80c52
commit 272b22bccb
4 changed files with 14 additions and 0 deletions

View File

@ -686,6 +686,7 @@ printf("manager getvalue %d called\n", variable);
nsresult nsPluginHostImpl :: ReloadPlugins(PRBool reloadPages)
{
mPluginsLoaded = PR_FALSE;
return LoadPlugins();
}
@ -1211,6 +1212,8 @@ printf("plugin %s added to list %s\n", plugintag->mName, (plugintag->mFlags & NS
#endif
#endif
mPluginsLoaded = PR_TRUE;
return NS_OK;
}
@ -1220,6 +1223,9 @@ nsresult nsPluginHostImpl :: InstantiatePlugin(const char *aMimeType, nsIURL *aU
nsPluginTag *plugins = nsnull;
PRInt32 variants, cnt;
if (PR_FALSE == mPluginsLoaded)
LoadPlugins();
if (nsnull != aMimeType)
{
plugins = mPlugins;

View File

@ -169,6 +169,7 @@ private:
char *mPluginPath;
nsPluginTag *mPlugins;
nsIMalloc *mMalloc;
PRBool mPluginsLoaded;
};
#endif

View File

@ -686,6 +686,7 @@ printf("manager getvalue %d called\n", variable);
nsresult nsPluginHostImpl :: ReloadPlugins(PRBool reloadPages)
{
mPluginsLoaded = PR_FALSE;
return LoadPlugins();
}
@ -1211,6 +1212,8 @@ printf("plugin %s added to list %s\n", plugintag->mName, (plugintag->mFlags & NS
#endif
#endif
mPluginsLoaded = PR_TRUE;
return NS_OK;
}
@ -1220,6 +1223,9 @@ nsresult nsPluginHostImpl :: InstantiatePlugin(const char *aMimeType, nsIURL *aU
nsPluginTag *plugins = nsnull;
PRInt32 variants, cnt;
if (PR_FALSE == mPluginsLoaded)
LoadPlugins();
if (nsnull != aMimeType)
{
plugins = mPlugins;

View File

@ -169,6 +169,7 @@ private:
char *mPluginPath;
nsPluginTag *mPlugins;
nsIMalloc *mMalloc;
PRBool mPluginsLoaded;
};
#endif