mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Addressing 22954, removed tag info query for full page plugins, r=edburns@acm.org
This commit is contained in:
parent
3dbd4c88b9
commit
8fbbc3c0cf
@ -1802,47 +1802,10 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
nsresult rv;
|
||||
nsIURI *url;
|
||||
PRBool isJavaEnabled = PR_TRUE;
|
||||
nsCOMPtr<nsIPluginTagInfo2> pti2 = nsnull;
|
||||
nsPluginTagType tagType;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateFullPagePlugin for %s\n",aMimeType);
|
||||
#endif
|
||||
rv = aOwner->QueryInterface(kIPluginTagInfo2IID, getter_AddRefs(pti2));
|
||||
|
||||
if(rv != NS_OK) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = pti2->GetTagType(&tagType);
|
||||
|
||||
if((rv != NS_OK) || !((tagType == nsPluginTagType_Embed)
|
||||
|| (tagType == nsPluginTagType_Applet)
|
||||
|| (tagType == nsPluginTagType_Object)))
|
||||
{
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (tagType == nsPluginTagType_Applet) {
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefServiceCID));
|
||||
// see if java is enabled
|
||||
if (prefs) {
|
||||
rv = prefs->GetBoolPref("security.enable_java", &isJavaEnabled);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// if not, don't show this plugin
|
||||
if (!isJavaEnabled) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// if we were unable to get the pref, assume java is enabled
|
||||
// and rely on the "find the plugin or not" logic.
|
||||
|
||||
// make sure the value wasn't modified in GetBoolPref
|
||||
isJavaEnabled = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//create a URL so that the instantiator can do file ext.
|
||||
//based plugin lookups...
|
||||
|
@ -1802,47 +1802,10 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
nsresult rv;
|
||||
nsIURI *url;
|
||||
PRBool isJavaEnabled = PR_TRUE;
|
||||
nsCOMPtr<nsIPluginTagInfo2> pti2 = nsnull;
|
||||
nsPluginTagType tagType;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("InstantiateFullPagePlugin for %s\n",aMimeType);
|
||||
#endif
|
||||
rv = aOwner->QueryInterface(kIPluginTagInfo2IID, getter_AddRefs(pti2));
|
||||
|
||||
if(rv != NS_OK) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = pti2->GetTagType(&tagType);
|
||||
|
||||
if((rv != NS_OK) || !((tagType == nsPluginTagType_Embed)
|
||||
|| (tagType == nsPluginTagType_Applet)
|
||||
|| (tagType == nsPluginTagType_Object)))
|
||||
{
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (tagType == nsPluginTagType_Applet) {
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefServiceCID));
|
||||
// see if java is enabled
|
||||
if (prefs) {
|
||||
rv = prefs->GetBoolPref("security.enable_java", &isJavaEnabled);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// if not, don't show this plugin
|
||||
if (!isJavaEnabled) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// if we were unable to get the pref, assume java is enabled
|
||||
// and rely on the "find the plugin or not" logic.
|
||||
|
||||
// make sure the value wasn't modified in GetBoolPref
|
||||
isJavaEnabled = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//create a URL so that the instantiator can do file ext.
|
||||
//based plugin lookups...
|
||||
|
Loading…
Reference in New Issue
Block a user