2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
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 "nspluginroot.idl"
|
2009-07-07 18:00:11 -07:00
|
|
|
#include "nsISupports.idl"
|
2007-07-03 14:42:35 -07:00
|
|
|
#include "nsIPluginTag.idl"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
%{C++
|
2009-06-25 14:06:54 -07:00
|
|
|
#define MOZ_PLUGIN_HOST_CONTRACTID \
|
|
|
|
"@mozilla.org/plugin/host;1"
|
2007-03-22 10:30:00 -07:00
|
|
|
%}
|
|
|
|
|
2013-02-14 13:38:41 -08:00
|
|
|
[scriptable, uuid(f89e7679-0adf-4a30-bda9-1afe1ee270d6)]
|
|
|
|
interface nsIPluginPlayPreviewInfo : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute AUTF8String mimeType;
|
|
|
|
readonly attribute boolean ignoreCTP;
|
|
|
|
readonly attribute AUTF8String redirectURL;
|
|
|
|
};
|
|
|
|
|
|
|
|
[scriptable, uuid(67ebff01-0dce-48f7-b6a5-6235fc78382b)]
|
2009-07-07 18:00:11 -07:00
|
|
|
interface nsIPluginHost : nsISupports
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2009-06-25 14:06:54 -07:00
|
|
|
/**
|
|
|
|
* Causes the plugins directory to be searched again for new plugin
|
|
|
|
* libraries.
|
|
|
|
*
|
|
|
|
* @param reloadPages - indicates whether currently visible pages should
|
|
|
|
* also be reloaded
|
|
|
|
*/
|
|
|
|
void reloadPlugins(in boolean reloadPages);
|
|
|
|
|
2009-11-09 13:11:58 -08:00
|
|
|
void getPluginTags([optional] out unsigned long aPluginCount,
|
2007-07-03 14:42:35 -07:00
|
|
|
[retval, array, size_is(aPluginCount)] out nsIPluginTag aResults);
|
2011-02-08 14:16:07 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Flags for use with clearSiteData.
|
|
|
|
*
|
|
|
|
* FLAG_CLEAR_ALL: clear all data associated with a site.
|
|
|
|
* FLAG_CLEAR_CACHE: clear cached data that can be retrieved again without
|
|
|
|
* loss of functionality. To be used out of concern for
|
|
|
|
* space and not necessarily privacy.
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
const uint32_t FLAG_CLEAR_ALL = 0;
|
|
|
|
const uint32_t FLAG_CLEAR_CACHE = 1;
|
2011-02-08 14:16:07 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Clear site data for a given plugin.
|
|
|
|
*
|
|
|
|
* @param plugin: the plugin to clear data for, such as one returned by
|
|
|
|
* nsIPluginHost.getPluginTags.
|
|
|
|
* @param domain: the domain to clear data for. If this argument is null,
|
|
|
|
* clear data for all domains. Otherwise, it must be a domain
|
|
|
|
* only (not a complete URI or IRI). The base domain for the
|
|
|
|
* given site will be determined; any data for the base domain
|
|
|
|
* or its subdomains will be cleared.
|
|
|
|
* @param flags: a flag value defined above.
|
|
|
|
* @param maxAge: the maximum age in seconds of data to clear, inclusive. If
|
|
|
|
* maxAge is 0, no data is cleared; if it is -1, all data is
|
|
|
|
* cleared.
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_INVALID_ARG if the domain argument is malformed.
|
|
|
|
* @throws NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED if maxAge is a value other
|
|
|
|
* than -1 and the plugin does not support clearing by timerange in
|
|
|
|
* general or for that particular site and/or flag combination.
|
|
|
|
*/
|
|
|
|
void clearSiteData(in nsIPluginTag plugin, in AUTF8String domain,
|
2012-08-22 08:56:38 -07:00
|
|
|
in uint64_t flags, in int64_t maxAge);
|
2011-02-08 14:16:07 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Determine if a plugin has stored data for a given site.
|
|
|
|
*
|
|
|
|
* @param plugin: the plugin to query, such as one returned by
|
|
|
|
* nsIPluginHost.getPluginTags.
|
|
|
|
* @param domain: the domain to test. If this argument is null, test if data
|
|
|
|
* is stored for any site. The base domain for the given domain
|
|
|
|
* will be determined; if any data for the base domain or its
|
|
|
|
* subdomains is found, return true.
|
|
|
|
*/
|
|
|
|
boolean siteHasData(in nsIPluginTag plugin, in AUTF8String domain);
|
2012-08-25 14:18:44 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Registers the play preview plugin mode for specific mime type
|
|
|
|
*
|
2013-02-14 13:38:41 -08:00
|
|
|
* @param mimeType: specifies plugin mime type.
|
|
|
|
* @param ignoreCTP: if true, the play preview ignores CTP rules, e.g.
|
|
|
|
whitelisted websites, will not notify about plugin
|
|
|
|
presence in the address bar.
|
|
|
|
* @param redirectURL: specifies url for the overlay iframe
|
2012-08-25 14:18:44 -07:00
|
|
|
*/
|
2013-02-14 13:38:41 -08:00
|
|
|
void registerPlayPreviewMimeType(in AUTF8String mimeType,
|
|
|
|
[optional] in boolean ignoreCTP,
|
|
|
|
[optional] in AUTF8String redirectURL);
|
2012-08-25 14:18:44 -07:00
|
|
|
|
|
|
|
void unregisterPlayPreviewMimeType(in AUTF8String mimeType);
|
2012-11-19 14:03:24 -08:00
|
|
|
|
2013-02-14 13:38:41 -08:00
|
|
|
nsIPluginPlayPreviewInfo getPlayPreviewInfo(in AUTF8String mimeType);
|
|
|
|
|
2012-11-27 10:09:10 -08:00
|
|
|
ACString getPermissionStringForType(in AUTF8String mimeType);
|
|
|
|
|
2012-11-19 14:03:24 -08:00
|
|
|
bool isPluginClickToPlayForType(in AUTF8String mimeType);
|
2011-02-08 14:16:07 -08:00
|
|
|
};
|
|
|
|
|