2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2009-12-10 20:02:13 -08:00
|
|
|
interface nsIFrame;
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIObjectFrame;
|
2010-03-16 22:10:08 -07:00
|
|
|
interface nsIPluginTag;
|
2009-11-20 08:26:10 -08:00
|
|
|
interface nsIDOMElement;
|
|
|
|
interface nsIDOMClientRect;
|
2012-02-27 13:58:00 -08:00
|
|
|
interface nsIURI;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-05-17 18:48:34 -07:00
|
|
|
%{C++
|
|
|
|
#include "nsNPAPIPluginInstance.h"
|
|
|
|
%}
|
|
|
|
[ptr] native nsNPAPIPluginInstancePtr(nsNPAPIPluginInstance);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* This interface represents a content node that loads objects.
|
|
|
|
*/
|
2012-06-19 16:25:56 -07:00
|
|
|
|
2012-08-25 14:18:44 -07:00
|
|
|
[scriptable, uuid(a812424b-4820-4e28-96c8-dd2b69e36496)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIObjectLoadingContent : nsISupports
|
|
|
|
{
|
2012-07-05 14:07:46 -07:00
|
|
|
/**
|
|
|
|
* See notes in nsObjectLoadingContent.h
|
|
|
|
*/
|
2007-03-22 10:30:00 -07:00
|
|
|
const unsigned long TYPE_LOADING = 0;
|
|
|
|
const unsigned long TYPE_IMAGE = 1;
|
|
|
|
const unsigned long TYPE_PLUGIN = 2;
|
|
|
|
const unsigned long TYPE_DOCUMENT = 3;
|
|
|
|
const unsigned long TYPE_NULL = 4;
|
|
|
|
|
2012-08-20 15:00:51 -07:00
|
|
|
// The content type is not supported (e.g. plugin not installed)
|
|
|
|
const unsigned long PLUGIN_UNSUPPORTED = 0;
|
|
|
|
// Showing alternate content
|
|
|
|
const unsigned long PLUGIN_ALTERNATE = 1;
|
|
|
|
// The plugin exists, but is disabled
|
|
|
|
const unsigned long PLUGIN_DISABLED = 2;
|
|
|
|
// The plugin is blocklisted and disabled
|
|
|
|
const unsigned long PLUGIN_BLOCKLISTED = 3;
|
|
|
|
// The plugin is considered outdated, but not disabled
|
|
|
|
const unsigned long PLUGIN_OUTDATED = 4;
|
|
|
|
// The plugin has crashed
|
|
|
|
const unsigned long PLUGIN_CRASHED = 5;
|
|
|
|
// Suppressed by security policy
|
|
|
|
const unsigned long PLUGIN_SUPPRESSED = 6;
|
|
|
|
// Blocked by content policy
|
|
|
|
const unsigned long PLUGIN_USER_DISABLED = 7;
|
2012-10-04 12:57:24 -07:00
|
|
|
/// ** All values >= PLUGIN_CLICK_TO_PLAY are plugin placeholder types that
|
|
|
|
/// would be replaced by a real plugin if activated (playPlugin())
|
2012-08-20 15:00:51 -07:00
|
|
|
// The plugin is disabled until the user clicks on it
|
|
|
|
const unsigned long PLUGIN_CLICK_TO_PLAY = 8;
|
|
|
|
// The plugin is vulnerable (update available)
|
|
|
|
const unsigned long PLUGIN_VULNERABLE_UPDATABLE = 9;
|
|
|
|
// The plugin is vulnerable (no update available)
|
|
|
|
const unsigned long PLUGIN_VULNERABLE_NO_UPDATE = 10;
|
2012-08-25 14:18:44 -07:00
|
|
|
// The plugin is in play preview mode
|
|
|
|
const unsigned long PLUGIN_PLAY_PREVIEW = 11;
|
2012-08-20 15:00:51 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* The actual mime type (the one we got back from the network
|
|
|
|
* request) for the element.
|
|
|
|
*/
|
|
|
|
readonly attribute ACString actualType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the type of the content that's currently loaded. See
|
|
|
|
* the constants above for the list of possible values.
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long displayedType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the content type that corresponds to the give MIME type. See the
|
|
|
|
* constants above for the list of possible values. If nothing else fits,
|
|
|
|
* TYPE_NULL will be returned.
|
|
|
|
*/
|
|
|
|
unsigned long getContentTypeForMIMEType(in AUTF8String aMimeType);
|
|
|
|
|
2008-03-14 16:08:57 -07:00
|
|
|
/**
|
|
|
|
* Returns the plugin instance if it has already been instantiated. This
|
|
|
|
* will never instantiate the plugin and so is safe to call even when
|
|
|
|
* content script must not execute.
|
|
|
|
*/
|
2011-05-17 18:48:34 -07:00
|
|
|
[noscript] readonly attribute nsNPAPIPluginInstancePtr pluginInstance;
|
2008-03-14 16:08:57 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Tells the content about an associated object frame.
|
|
|
|
* This can be called multiple times for different frames.
|
|
|
|
*
|
|
|
|
* This is noscript because this is an internal method that will go away, and
|
|
|
|
* because nsIObjectFrame is unscriptable.
|
|
|
|
*/
|
|
|
|
[noscript] void hasNewFrame(in nsIObjectFrame aFrame);
|
2009-11-20 08:26:10 -08:00
|
|
|
|
2012-01-31 13:55:54 -08:00
|
|
|
[noscript] void disconnectFrame();
|
|
|
|
|
2009-12-10 20:02:13 -08:00
|
|
|
/**
|
|
|
|
* If this object is in going to be printed, this method
|
|
|
|
* returns the nsIObjectFrame object which should be used when
|
|
|
|
* printing the plugin. The returned nsIFrame is in the original document,
|
|
|
|
* not in the static clone.
|
|
|
|
*/
|
|
|
|
[noscript] nsIFrame getPrintFrame();
|
2010-01-13 08:42:41 -08:00
|
|
|
|
2010-03-16 22:10:08 -07:00
|
|
|
[noscript] void pluginCrashed(in nsIPluginTag pluginTag,
|
2010-03-24 14:22:04 -07:00
|
|
|
in AString pluginDumpID,
|
|
|
|
in AString browserDumpID,
|
2010-02-09 17:05:31 -08:00
|
|
|
in boolean submittedCrashReport);
|
2011-12-10 09:23:05 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method will play a plugin that has been stopped by the
|
2012-10-04 12:57:24 -07:00
|
|
|
* click-to-play plugins or play-preview features.
|
2011-12-10 09:23:05 -08:00
|
|
|
*/
|
|
|
|
void playPlugin();
|
2012-01-31 13:55:54 -08:00
|
|
|
|
2012-03-28 08:53:56 -07:00
|
|
|
/**
|
2012-10-04 12:57:24 -07:00
|
|
|
* This attribute will return true if the current content type has been
|
|
|
|
* activated, either explicitly or by passing checks that would have it be
|
|
|
|
* click-to-play or play-preview.
|
2012-03-28 08:53:56 -07:00
|
|
|
*/
|
|
|
|
readonly attribute boolean activated;
|
|
|
|
|
2012-01-31 13:55:54 -08:00
|
|
|
[noscript] void stopPluginInstance();
|
|
|
|
|
|
|
|
[noscript] void syncStartPluginInstance();
|
|
|
|
[noscript] void asyncStartPluginInstance();
|
2012-03-12 09:48:27 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The URL of the data/src loaded in the object. This may be null (i.e.
|
|
|
|
* an <embed> with no src).
|
|
|
|
*/
|
|
|
|
readonly attribute nsIURI srcURI;
|
2012-08-20 15:00:51 -07:00
|
|
|
|
|
|
|
readonly attribute unsigned long pluginFallbackType;
|
2012-08-25 14:18:44 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method will disable the play-preview plugin state.
|
|
|
|
*/
|
|
|
|
void cancelPlayPreview();
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|