зеркало из https://github.com/mozilla/pjs.git
Bug 637253: Remove nsIPlugin interface. r=bsmedberg
This commit is contained in:
Родитель
b3100f8670
Коммит
c530cd6322
|
@ -54,7 +54,6 @@ EXPORTS_NAMESPACES = mozilla
|
|||
|
||||
XPIDLSRCS = \
|
||||
nsIHTTPHeaderListener.idl \
|
||||
nsIPlugin.idl \
|
||||
nsIPluginDocument.idl \
|
||||
nsIPluginHost.idl \
|
||||
nsIPluginInputStream.idl \
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nspluginroot.idl"
|
||||
|
||||
%{C++
|
||||
#include "npapi.h"
|
||||
|
||||
#define MOZ_PLUGIN_CONTRACTID \
|
||||
"@mozilla.org/plugin/plugin;1"
|
||||
%}
|
||||
|
||||
interface nsIPluginInstance;
|
||||
|
||||
[uuid(94C32FEA-5C50-49D3-9D3D-9047CD342777)]
|
||||
interface nsIPlugin : nsISupports
|
||||
{
|
||||
/**
|
||||
* Creates a new plugin instance, based on a MIME type. This
|
||||
* allows different impelementations to be created depending on
|
||||
* the specified MIME type.
|
||||
*/
|
||||
void createPluginInstance(out nsIPluginInstance aResult);
|
||||
|
||||
/**
|
||||
* Called when the browser is done with the plugin factory, or when
|
||||
* the plugin is disabled by the user.
|
||||
*
|
||||
* (Corresponds to NPP_Shutdown.)
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
void shutdown();
|
||||
};
|
|
@ -55,7 +55,6 @@
|
|||
"@mozilla.org/plugin/host;1"
|
||||
%}
|
||||
|
||||
interface nsIPlugin;
|
||||
interface nsIURI;
|
||||
interface nsIDOMPlugin;
|
||||
interface nsIChannel;
|
||||
|
@ -64,7 +63,7 @@ interface nsIPluginStreamListener;
|
|||
[ptr] native PRLibraryPtr(PRLibrary);
|
||||
[ptr] native nsPluginNativeWindowPtr(nsPluginNativeWindow);
|
||||
|
||||
[scriptable, uuid(0BB66261-4114-4D73-8DFC-C3CA997E6817)]
|
||||
[scriptable, uuid(FB2E7827-1E7D-4DCC-93A8-94098A4B588D)]
|
||||
interface nsIPluginHost : nsISupports
|
||||
{
|
||||
[noscript] void init();
|
||||
|
@ -82,8 +81,6 @@ interface nsIPluginHost : nsISupports
|
|||
*/
|
||||
void reloadPlugins(in boolean reloadPages);
|
||||
|
||||
[noscript] nsIPlugin getPlugin(in string aMimeType);
|
||||
|
||||
/**
|
||||
* Instantiate an embedded plugin for an existing channel. The caller is
|
||||
* responsible for opening the channel. It may or may not be already opened
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
#include "nsISupports.idl"
|
||||
#include "nspluginroot.idl"
|
||||
#include "nsIPlugin.idl"
|
||||
#include "nsIInputStream.idl"
|
||||
|
||||
interface nsIPluginInstance;
|
||||
|
|
|
@ -233,7 +233,7 @@ static void CheckClassInitialized()
|
|||
NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL,("NPN callbacks initialized\n"));
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsNPAPIPlugin, nsIPlugin)
|
||||
NS_IMPL_ISUPPORTS0(nsNPAPIPlugin)
|
||||
|
||||
nsNPAPIPlugin::nsNPAPIPlugin()
|
||||
{
|
||||
|
@ -534,7 +534,7 @@ nsNPAPIPlugin::PluginFuncs()
|
|||
return &mPluginFuncs;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
nsNPAPIPlugin::CreatePluginInstance(nsIPluginInstance **aResult)
|
||||
{
|
||||
if (!aResult)
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#ifndef nsNPAPIPlugin_h_
|
||||
#define nsNPAPIPlugin_h_
|
||||
|
||||
#include "nsIPlugin.h"
|
||||
#include "prlink.h"
|
||||
#include "npfunctions.h"
|
||||
#include "nsPluginHost.h"
|
||||
|
@ -72,7 +71,7 @@ typedef NS_NPAPIPLUGIN_CALLBACK(NPError, NP_PLUGININIT) (const NPNetscapeFuncs*
|
|||
typedef NS_NPAPIPLUGIN_CALLBACK(NPError, NP_PLUGINUNIXINIT) (const NPNetscapeFuncs* pCallbacks, NPPluginFuncs* fCallbacks);
|
||||
typedef NS_NPAPIPLUGIN_CALLBACK(NPError, NP_PLUGINSHUTDOWN) ();
|
||||
|
||||
class nsNPAPIPlugin : public nsIPlugin
|
||||
class nsNPAPIPlugin : public nsISupports
|
||||
{
|
||||
private:
|
||||
typedef mozilla::PluginLibrary PluginLibrary;
|
||||
|
@ -82,7 +81,6 @@ public:
|
|||
virtual ~nsNPAPIPlugin();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPLUGIN
|
||||
|
||||
// Constructs and initializes an nsNPAPIPlugin object. A NULL file path
|
||||
// will prevent this from calling NP_Initialize.
|
||||
|
@ -105,6 +103,9 @@ public:
|
|||
|
||||
static PRBool RunPluginOOP(const nsPluginTag *aPluginTag);
|
||||
|
||||
nsresult CreatePluginInstance(nsIPluginInstance **aResult);
|
||||
nsresult Shutdown();
|
||||
|
||||
protected:
|
||||
NPPluginFuncs mPluginFuncs;
|
||||
PluginLibrary* mLibrary;
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "nsIComponentManager.h"
|
||||
#include "nsNPAPIPlugin.h"
|
||||
#include "nsNPAPIPluginStreamListener.h"
|
||||
#include "nsIPlugin.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsIPluginStreamListener.h"
|
||||
#include "nsIHTTPHeaderListener.h"
|
||||
|
@ -1323,7 +1322,7 @@ nsPluginHost::TrySetUpPluginInstance(const char *aMimeType,
|
|||
|
||||
NS_ASSERTION(pluginTag, "Must have plugin tag here!");
|
||||
|
||||
nsCOMPtr<nsIPlugin> plugin;
|
||||
nsRefPtr<nsNPAPIPlugin> plugin;
|
||||
GetPlugin(mimetype, getter_AddRefs(plugin));
|
||||
|
||||
nsCOMPtr<nsIPluginInstance> instance;
|
||||
|
@ -1726,7 +1725,7 @@ nsresult nsPluginHost::EnsurePluginLoaded(nsPluginTag* plugin)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginHost::GetPlugin(const char *aMimeType, nsIPlugin** aPlugin)
|
||||
nsresult nsPluginHost::GetPlugin(const char *aMimeType, nsNPAPIPlugin** aPlugin)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
*aPlugin = NULL;
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#include "prclist.h"
|
||||
#include "npapi.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsIPlugin.h"
|
||||
#include "nsIPluginTag.h"
|
||||
#include "nsPluginsDir.h"
|
||||
#include "nsPluginDirServiceProvider.h"
|
||||
|
@ -178,6 +177,8 @@ public:
|
|||
// Does not accept NULL and should never fail.
|
||||
nsPluginTag* TagForPlugin(nsNPAPIPlugin* aPlugin);
|
||||
|
||||
nsresult GetPlugin(const char *aMimeType, nsNPAPIPlugin** aPlugin);
|
||||
|
||||
private:
|
||||
nsresult
|
||||
TrySetUpPluginInstance(const char *aMimeType, nsIURI *aURL, nsIPluginInstanceOwner *aOwner);
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsIPluginTag.h"
|
||||
#include "nsIPlugin.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsISupportsArray.h"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче