mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 883404 - Add a object.reload() call for chrome to de-activate plugins. r=josh
This commit is contained in:
parent
52b9644728
commit
1383b35b3b
@ -25,7 +25,7 @@ class nsNPAPIPluginInstance;
|
||||
* interface to mirror this interface when changing it.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(070bfc7f-f8b8-4e84-aa31-a0bfaffa8e8e)]
|
||||
[scriptable, uuid(16c14177-52eb-49d3-9842-a1a0b92be11a)]
|
||||
interface nsIObjectLoadingContent : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -133,6 +133,14 @@ interface nsIObjectLoadingContent : nsISupports
|
||||
*/
|
||||
void playPlugin();
|
||||
|
||||
/**
|
||||
* Forces a re-evaluation and reload of the tag, optionally invalidating its
|
||||
* click-to-play state. This can be used when the MIME type that provides a
|
||||
* type has changed, for instance, to force the tag to re-evalulate the
|
||||
* handler to use.
|
||||
*/
|
||||
void reload(in boolean aClearActivation);
|
||||
|
||||
/**
|
||||
* This attribute will return true if the current content type has been
|
||||
* activated, either explicitly or by passing checks that would have it be
|
||||
|
@ -2894,6 +2894,17 @@ nsObjectLoadingContent::PlayPlugin()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsObjectLoadingContent::Reload(bool aClearActivation)
|
||||
{
|
||||
if (aClearActivation) {
|
||||
mActivated = false;
|
||||
mPlayPreviewCanceled = false;
|
||||
}
|
||||
|
||||
return LoadObject(true, true);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsObjectLoadingContent::GetActivated(bool *aActivated)
|
||||
{
|
||||
|
@ -179,6 +179,10 @@ class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
{
|
||||
aRv = PlayPlugin();
|
||||
}
|
||||
void Reload(bool aClearActivation, mozilla::ErrorResult& aRv)
|
||||
{
|
||||
aRv = Reload(aClearActivation);
|
||||
}
|
||||
bool Activated() const
|
||||
{
|
||||
return mActivated;
|
||||
|
@ -162,6 +162,15 @@ interface MozObjectLoadingContent {
|
||||
[ChromeOnly, Throws]
|
||||
void playPlugin();
|
||||
|
||||
/**
|
||||
* Forces a re-evaluation and reload of the tag, optionally invalidating its
|
||||
* click-to-play state. This can be used when the MIME type that provides a
|
||||
* type has changed, for instance, to force the tag to re-evalulate the
|
||||
* handler to use.
|
||||
*/
|
||||
[ChromeOnly, Throws]
|
||||
void reload(boolean aClearActivation);
|
||||
|
||||
/**
|
||||
* This attribute will return true if the current content type has been
|
||||
* activated, either explicitly or by passing checks that would have it be
|
||||
|
Loading…
Reference in New Issue
Block a user