bug #36908: checking in for endico, r=scc, a=brendan
git-svn-id: svn://10.0.0.236/trunk@79864 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c985ec638f
commit
1bb5c6c6ce
59
mozilla/netwerk/protocol/about/src/nsAboutPlugins.cpp
Executable file
59
mozilla/netwerk/protocol/about/src/nsAboutPlugins.cpp
Executable file
@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Sammy Ford <sford@swbell.net>
|
||||
* Dawn Endico <endico@mozilla.org>
|
||||
*/
|
||||
|
||||
#include "nsAboutPlugins.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsAboutPlugins, NS_GET_IID(nsIAboutModule));
|
||||
|
||||
static const char kPluginsPage[] = "chrome://global/content/plugins.html";
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAboutPlugins::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
{
|
||||
nsresult rv;
|
||||
NS_WITH_SERVICE(nsIIOService, ioService, kIOServiceCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
rv = ioService->NewChannel(kPluginsPage, nsnull, result);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsAboutPlugins::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsAboutPlugins* about = new nsAboutPlugins();
|
||||
if (about == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(about);
|
||||
nsresult rv = about->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(about);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
54
mozilla/netwerk/protocol/about/src/nsAboutPlugins.h
Executable file
54
mozilla/netwerk/protocol/about/src/nsAboutPlugins.h
Executable file
@ -0,0 +1,54 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Sammy Ford <sford@swbell.com>
|
||||
* Dawn Endico <endico@mozilla.org>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef nsAboutPlugins_h__
|
||||
#define nsAboutPlugins_h__
|
||||
|
||||
#include "nsIAboutModule.h"
|
||||
|
||||
class nsAboutPlugins : public nsIAboutModule
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSIABOUTMODULE
|
||||
|
||||
nsAboutPlugins() { NS_INIT_REFCNT(); }
|
||||
virtual ~nsAboutPlugins() {}
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#define NS_ABOUT_PLUGINS_MODULE_CID \
|
||||
{ /* 344aef06-1dd2-11b2-a070-bd6118526e42 */ \
|
||||
0x344aef06, \
|
||||
0x1dd2, \
|
||||
0x11b2, \
|
||||
{0xa0, 0x70, 0xbd, 0x61, 0x18, 0x52, 0x6e, 0x42} \
|
||||
}
|
||||
|
||||
#endif // nsAboutPlugins_h__
|
||||
90
mozilla/xpfe/communicator/resources/content/plugins.html
Executable file
90
mozilla/xpfe/communicator/resources/content/plugins.html
Executable file
@ -0,0 +1,90 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>About Plug-ins</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<SCRIPT language="JavaScript1.5">
|
||||
|
||||
<!-- JavaScript to enumerate and display all installed plug-ins -->
|
||||
|
||||
<!-- First, refresh plugins in case anything has been changed recently in -->
|
||||
<!-- prefs: (The "false" argument tells refresh not to reload or activate -->
|
||||
<!-- any plugins that would be active otherwise. In contrast, one would -->
|
||||
<!-- use "true" in the case of ASD instead of restarting) -->
|
||||
navigator.plugins.refresh(false);
|
||||
|
||||
|
||||
numPlugins = navigator.plugins.length;
|
||||
|
||||
if (numPlugins > 0)
|
||||
document.writeln("<b><font size=+3>Installed plug-ins</font></b><br>");
|
||||
else
|
||||
document.writeln("<b><font size=+2>No plug-ins are installed.</font></b><br>");
|
||||
|
||||
document.writeln("Find more information about browser plug-ins at ");
|
||||
document.writeln("<A HREF=\"http://home.netscape.com/plugins/index.html\">Netscape Netcenter</A>.");
|
||||
document.writeln("<p><hr>");
|
||||
|
||||
for (i = 0; i < numPlugins; i++)
|
||||
{
|
||||
plugin = navigator.plugins[i];
|
||||
|
||||
document.write("<center><font size=\"+1\"><b>");
|
||||
document.write(plugin.name);
|
||||
document.writeln("</b></font></center><br>");
|
||||
|
||||
document.writeln("<dl><dd>File name:");
|
||||
document.write(plugin.filename);
|
||||
document.write("<dd><br>");
|
||||
document.write(plugin.description);
|
||||
document.writeln("</dl><p>");
|
||||
|
||||
document.writeln("<table width=\"100%\" border=\"2\" cellpadding=\"5\">");
|
||||
document.writeln("<tr><th width=\"20%\"><font size=\"-1\">Mime Type</font></th>");
|
||||
document.writeln("<th width=\"50%\"><font size=\"-1\">Description</font></th>");
|
||||
document.writeln("<th width=\"20%\"><font size=\"-1\">Suffixes</font></th>");
|
||||
document.writeln("<th><font size=\"-1\">Enabled</th></tr>");
|
||||
numTypes = plugin.length;
|
||||
for (j = 0; j < numTypes; j++)
|
||||
{
|
||||
mimetype = plugin[j];
|
||||
|
||||
if (mimetype)
|
||||
{
|
||||
enabled = "No";
|
||||
enabledPlugin = mimetype.enabledPlugin;
|
||||
if (enabledPlugin && (enabledPlugin.name == plugin.name))
|
||||
enabled = "Yes";
|
||||
|
||||
document.writeln("<tr align=\"center\">");
|
||||
document.writeln("<td>" + mimetype.type + "</td>");
|
||||
document.writeln("<td>" + mimetype.description + "</td>");
|
||||
document.writeln("<td>" + mimetype.suffixes + "</td>");
|
||||
document.writeln("<td>" + enabled + "</td>");
|
||||
document.writeln("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
document.write("</table><p><hr><p>");
|
||||
}
|
||||
|
||||
</SCRIPT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
90
mozilla/xpfe/global/resources/content/plugins.html
Executable file
90
mozilla/xpfe/global/resources/content/plugins.html
Executable file
@ -0,0 +1,90 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>About Plug-ins</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<SCRIPT language="JavaScript1.5">
|
||||
|
||||
<!-- JavaScript to enumerate and display all installed plug-ins -->
|
||||
|
||||
<!-- First, refresh plugins in case anything has been changed recently in -->
|
||||
<!-- prefs: (The "false" argument tells refresh not to reload or activate -->
|
||||
<!-- any plugins that would be active otherwise. In contrast, one would -->
|
||||
<!-- use "true" in the case of ASD instead of restarting) -->
|
||||
navigator.plugins.refresh(false);
|
||||
|
||||
|
||||
numPlugins = navigator.plugins.length;
|
||||
|
||||
if (numPlugins > 0)
|
||||
document.writeln("<b><font size=+3>Installed plug-ins</font></b><br>");
|
||||
else
|
||||
document.writeln("<b><font size=+2>No plug-ins are installed.</font></b><br>");
|
||||
|
||||
document.writeln("Find more information about browser plug-ins at ");
|
||||
document.writeln("<A HREF=\"http://home.netscape.com/plugins/index.html\">Netscape Netcenter</A>.");
|
||||
document.writeln("<p><hr>");
|
||||
|
||||
for (i = 0; i < numPlugins; i++)
|
||||
{
|
||||
plugin = navigator.plugins[i];
|
||||
|
||||
document.write("<center><font size=\"+1\"><b>");
|
||||
document.write(plugin.name);
|
||||
document.writeln("</b></font></center><br>");
|
||||
|
||||
document.writeln("<dl><dd>File name:");
|
||||
document.write(plugin.filename);
|
||||
document.write("<dd><br>");
|
||||
document.write(plugin.description);
|
||||
document.writeln("</dl><p>");
|
||||
|
||||
document.writeln("<table width=\"100%\" border=\"2\" cellpadding=\"5\">");
|
||||
document.writeln("<tr><th width=\"20%\"><font size=\"-1\">Mime Type</font></th>");
|
||||
document.writeln("<th width=\"50%\"><font size=\"-1\">Description</font></th>");
|
||||
document.writeln("<th width=\"20%\"><font size=\"-1\">Suffixes</font></th>");
|
||||
document.writeln("<th><font size=\"-1\">Enabled</th></tr>");
|
||||
numTypes = plugin.length;
|
||||
for (j = 0; j < numTypes; j++)
|
||||
{
|
||||
mimetype = plugin[j];
|
||||
|
||||
if (mimetype)
|
||||
{
|
||||
enabled = "No";
|
||||
enabledPlugin = mimetype.enabledPlugin;
|
||||
if (enabledPlugin && (enabledPlugin.name == plugin.name))
|
||||
enabled = "Yes";
|
||||
|
||||
document.writeln("<tr align=\"center\">");
|
||||
document.writeln("<td>" + mimetype.type + "</td>");
|
||||
document.writeln("<td>" + mimetype.description + "</td>");
|
||||
document.writeln("<td>" + mimetype.suffixes + "</td>");
|
||||
document.writeln("<td>" + enabled + "</td>");
|
||||
document.writeln("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
document.write("</table><p><hr><p>");
|
||||
}
|
||||
|
||||
</SCRIPT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Loading…
x
Reference in New Issue
Block a user