зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1314445 - Remove GMPService::GetPluginVersionForAPI. r=gerald
MozReview-Commit-ID: ybq6ZZlA9P --HG-- extra : rebase_source : 1a8356740cbb9d73f7d851cb82f8b71c0ca364c4
This commit is contained in:
Родитель
5ebd6552d1
Коммит
c28985ad89
|
@ -510,15 +510,6 @@ GeckoMediaPluginService::GetGMPDecryptor(GMPCrashHelper* aHelper,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginService::HasPluginForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
bool* aOutHavePlugin)
|
||||
{
|
||||
nsCString unused;
|
||||
return GetPluginVersionForAPI(aAPI, aTags, aOutHavePlugin, unused);
|
||||
}
|
||||
|
||||
void
|
||||
GeckoMediaPluginService::ConnectCrashHelper(uint32_t aPluginId, GMPCrashHelper* aHelper)
|
||||
{
|
||||
|
|
|
@ -69,8 +69,6 @@ public:
|
|||
|
||||
// mozIGeckoMediaPluginService
|
||||
NS_IMETHOD GetThread(nsIThread** aThread) override;
|
||||
NS_IMETHOD HasPluginForAPI(const nsACString& aAPI, nsTArray<nsCString>* aTags,
|
||||
bool *aRetVal) override;
|
||||
NS_IMETHOD GetGMPVideoDecoder(GMPCrashHelper* aHelper,
|
||||
nsTArray<nsCString>* aTags,
|
||||
const nsACString& aNodeId,
|
||||
|
|
|
@ -219,10 +219,9 @@ GeckoMediaPluginServiceChild::UpdateGMPCapabilities(nsTArray<GMPCapabilityData>&
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginServiceChild::GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
GeckoMediaPluginServiceChild::HasPluginForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
bool* aHasPlugin,
|
||||
nsACString& aOutVersion)
|
||||
bool* aHasPlugin)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (!sGMPCapabilities) {
|
||||
|
@ -233,7 +232,6 @@ GeckoMediaPluginServiceChild::GetPluginVersionForAPI(const nsACString& aAPI,
|
|||
nsCString api(aAPI);
|
||||
for (const GMPCapabilityAndVersion& plugin : *sGMPCapabilities) {
|
||||
if (GMPCapability::Supports(plugin.mCapabilities, api, *aTags)) {
|
||||
aOutVersion = plugin.mVersion;
|
||||
*aHasPlugin = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,9 @@ class GeckoMediaPluginServiceChild : public GeckoMediaPluginService
|
|||
public:
|
||||
static already_AddRefed<GeckoMediaPluginServiceChild> GetSingleton();
|
||||
|
||||
NS_IMETHOD GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
NS_IMETHOD HasPluginForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
bool* aHasPlugin,
|
||||
nsACString& aOutVersion) override;
|
||||
bool *aRetVal) override;
|
||||
NS_IMETHOD GetNodeId(const nsAString& aOrigin,
|
||||
const nsAString& aTopLevelOrigin,
|
||||
const nsAString& aGMPName,
|
||||
|
|
|
@ -959,14 +959,12 @@ GeckoMediaPluginServiceParent::RemoveAndDeletePluginDirectory(
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginServiceParent::GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
GeckoMediaPluginServiceParent::HasPluginForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
bool* aHasPlugin,
|
||||
nsACString& aOutVersion)
|
||||
bool* aHasPlugin)
|
||||
{
|
||||
NS_ENSURE_ARG(aTags && aTags->Length() > 0);
|
||||
NS_ENSURE_ARG(aHasPlugin);
|
||||
NS_ENSURE_ARG(aOutVersion.IsEmpty());
|
||||
|
||||
nsresult rv = EnsurePluginsOnDiskScanned();
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -979,12 +977,7 @@ GeckoMediaPluginServiceParent::GetPluginVersionForAPI(const nsACString& aAPI,
|
|||
nsCString api(aAPI);
|
||||
size_t index = 0;
|
||||
RefPtr<GMPParent> gmp = FindPluginForAPIFrom(index, api, *aTags, &index);
|
||||
if (gmp) {
|
||||
*aHasPlugin = true;
|
||||
aOutVersion = gmp->GetVersion();
|
||||
} else {
|
||||
*aHasPlugin = false;
|
||||
}
|
||||
*aHasPlugin = !!gmp;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -38,10 +38,9 @@ public:
|
|||
NS_DECL_NSIASYNCSHUTDOWNBLOCKER
|
||||
|
||||
// mozIGeckoMediaPluginService
|
||||
NS_IMETHOD GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
NS_IMETHOD HasPluginForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
bool* aHasPlugin,
|
||||
nsACString& aOutVersion) override;
|
||||
bool *aRetVal) override;
|
||||
NS_IMETHOD GetNodeId(const nsAString& aOrigin,
|
||||
const nsAString& aTopLevelOrigin,
|
||||
const nsAString& aGMPName,
|
||||
|
|
|
@ -76,14 +76,6 @@ interface mozIGeckoMediaPluginService : nsISupports
|
|||
[noscript]
|
||||
boolean hasPluginForAPI(in ACString api, in TagArray tags);
|
||||
|
||||
/**
|
||||
* Get the version of the plugin that supports the specified tags.
|
||||
* Callable on any thread
|
||||
*/
|
||||
[noscript]
|
||||
void getPluginVersionForAPI(in ACString api, in TagArray tags,
|
||||
out boolean hasPlugin, out ACString version);
|
||||
|
||||
/**
|
||||
* Get a video decoder that supports the specified tags.
|
||||
* The array of tags should at least contain a codec tag, and optionally
|
||||
|
|
Загрузка…
Ссылка в новой задаче