mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Addressing 22954, patch by amusil, r=av
This commit is contained in:
parent
adf7a1d3bd
commit
f873e68c74
@ -52,6 +52,7 @@ static NS_DEFINE_IID(kIContentViewerIID, NS_ICONTENT_VIEWER_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID);
|
||||
static NS_DEFINE_IID(kIPluginInstanceOwnerIID, NS_IPLUGININSTANCEOWNER_IID);
|
||||
static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
|
||||
static NS_DEFINE_IID(kILinkHandlerIID, NS_ILINKHANDLER_IID);
|
||||
static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID);
|
||||
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
||||
@ -78,7 +79,8 @@ public:
|
||||
nsIStreamListener* mNextStream;
|
||||
};
|
||||
|
||||
class pluginInstanceOwner : public nsIPluginInstanceOwner {
|
||||
class pluginInstanceOwner : public nsIPluginInstanceOwner
|
||||
{
|
||||
public:
|
||||
pluginInstanceOwner();
|
||||
virtual ~pluginInstanceOwner();
|
||||
@ -322,12 +324,11 @@ PluginViewerImpl::StartLoad(nsIChannel* channel, nsIStreamListener*& aResult)
|
||||
|
||||
// Only instantiate the plugin if our container can host it
|
||||
nsCOMPtr<nsIPluginHost> host;
|
||||
nsCOMPtr<nsIInterfaceRequestor> requestor(do_QueryInterface(mContainer));
|
||||
NS_ENSURE_TRUE(requestor, NS_ERROR_FAILURE);
|
||||
|
||||
nsresult rv = requestor->GetInterface(NS_GET_IID(nsIPluginHost),
|
||||
getter_AddRefs(host));
|
||||
if (NS_OK == rv) {
|
||||
host = do_GetService(kCPluginManagerCID);
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
if(host)
|
||||
{
|
||||
nsRect r;
|
||||
mWindow->GetClientBounds(r);
|
||||
rv = CreatePlugin(host, nsRect(0, 0, r.width, r.height), aResult);
|
||||
|
@ -1780,7 +1780,6 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
{
|
||||
nsresult rv;
|
||||
nsIURI *url;
|
||||
nsPluginTagType tagType;
|
||||
PRBool isJavaEnabled = PR_TRUE;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -52,6 +52,7 @@ static NS_DEFINE_IID(kIContentViewerIID, NS_ICONTENT_VIEWER_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID);
|
||||
static NS_DEFINE_IID(kIPluginInstanceOwnerIID, NS_IPLUGININSTANCEOWNER_IID);
|
||||
static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
|
||||
static NS_DEFINE_IID(kILinkHandlerIID, NS_ILINKHANDLER_IID);
|
||||
static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID);
|
||||
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
||||
@ -78,7 +79,8 @@ public:
|
||||
nsIStreamListener* mNextStream;
|
||||
};
|
||||
|
||||
class pluginInstanceOwner : public nsIPluginInstanceOwner {
|
||||
class pluginInstanceOwner : public nsIPluginInstanceOwner
|
||||
{
|
||||
public:
|
||||
pluginInstanceOwner();
|
||||
virtual ~pluginInstanceOwner();
|
||||
@ -322,12 +324,11 @@ PluginViewerImpl::StartLoad(nsIChannel* channel, nsIStreamListener*& aResult)
|
||||
|
||||
// Only instantiate the plugin if our container can host it
|
||||
nsCOMPtr<nsIPluginHost> host;
|
||||
nsCOMPtr<nsIInterfaceRequestor> requestor(do_QueryInterface(mContainer));
|
||||
NS_ENSURE_TRUE(requestor, NS_ERROR_FAILURE);
|
||||
|
||||
nsresult rv = requestor->GetInterface(NS_GET_IID(nsIPluginHost),
|
||||
getter_AddRefs(host));
|
||||
if (NS_OK == rv) {
|
||||
host = do_GetService(kCPluginManagerCID);
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
if(host)
|
||||
{
|
||||
nsRect r;
|
||||
mWindow->GetClientBounds(r);
|
||||
rv = CreatePlugin(host, nsRect(0, 0, r.width, r.height), aResult);
|
||||
|
@ -1780,7 +1780,6 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
|
||||
{
|
||||
nsresult rv;
|
||||
nsIURI *url;
|
||||
nsPluginTagType tagType;
|
||||
PRBool isJavaEnabled = PR_TRUE;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -52,6 +52,7 @@ static NS_DEFINE_IID(kIContentViewerIID, NS_ICONTENT_VIEWER_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID);
|
||||
static NS_DEFINE_IID(kIPluginInstanceOwnerIID, NS_IPLUGININSTANCEOWNER_IID);
|
||||
static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
|
||||
static NS_DEFINE_IID(kILinkHandlerIID, NS_ILINKHANDLER_IID);
|
||||
static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID);
|
||||
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
||||
@ -78,7 +79,8 @@ public:
|
||||
nsIStreamListener* mNextStream;
|
||||
};
|
||||
|
||||
class pluginInstanceOwner : public nsIPluginInstanceOwner {
|
||||
class pluginInstanceOwner : public nsIPluginInstanceOwner
|
||||
{
|
||||
public:
|
||||
pluginInstanceOwner();
|
||||
virtual ~pluginInstanceOwner();
|
||||
@ -322,12 +324,11 @@ PluginViewerImpl::StartLoad(nsIChannel* channel, nsIStreamListener*& aResult)
|
||||
|
||||
// Only instantiate the plugin if our container can host it
|
||||
nsCOMPtr<nsIPluginHost> host;
|
||||
nsCOMPtr<nsIInterfaceRequestor> requestor(do_QueryInterface(mContainer));
|
||||
NS_ENSURE_TRUE(requestor, NS_ERROR_FAILURE);
|
||||
|
||||
nsresult rv = requestor->GetInterface(NS_GET_IID(nsIPluginHost),
|
||||
getter_AddRefs(host));
|
||||
if (NS_OK == rv) {
|
||||
host = do_GetService(kCPluginManagerCID);
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
if(host)
|
||||
{
|
||||
nsRect r;
|
||||
mWindow->GetClientBounds(r);
|
||||
rv = CreatePlugin(host, nsRect(0, 0, r.width, r.height), aResult);
|
||||
|
Loading…
Reference in New Issue
Block a user