Bug 1507580 - Remove AutoplayPermissionRequest::mMainThreadTarget since it is unused r=baku

Differential Revision: https://phabricator.services.mozilla.com/D12055

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2018-11-19 21:48:21 +00:00
Родитель 164289e1b6
Коммит 21eed12a86
2 изменённых файлов: 4 добавлений и 11 удалений

Просмотреть файл

@ -25,13 +25,11 @@ NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(AutoplayPermissionRequest,
AutoplayPermissionRequest::AutoplayPermissionRequest(
AutoplayPermissionManager* aManager,
nsGlobalWindowInner* aWindow,
nsIPrincipal* aNodePrincipal,
nsIEventTarget* aMainThreadTarget)
nsIPrincipal* aNodePrincipal)
: ContentPermissionRequestBase(aNodePrincipal, false, aWindow,
NS_LITERAL_CSTRING(""), // No testing pref used in this class
NS_LITERAL_CSTRING("autoplay-media"))
, mManager(aManager)
, mMainThreadTarget(aMainThreadTarget)
{
}
@ -68,15 +66,13 @@ already_AddRefed<AutoplayPermissionRequest>
AutoplayPermissionRequest::Create(nsGlobalWindowInner* aWindow,
AutoplayPermissionManager* aManager)
{
if (!aWindow || !aWindow->GetPrincipal() ||
!aWindow->EventTargetFor(TaskCategory::Other)) {
if (!aWindow || !aWindow->GetPrincipal()) {
return nullptr;
}
RefPtr<AutoplayPermissionRequest> request =
new AutoplayPermissionRequest(aManager,
aWindow,
aWindow->GetPrincipal(),
aWindow->EventTargetFor(TaskCategory::Other));
aWindow->GetPrincipal());
PLAY_REQUEST_LOG("AutoplayPermissionRequest %p Create()", request.get());
return request.forget();
}

Просмотреть файл

@ -45,13 +45,10 @@ public:
private:
AutoplayPermissionRequest(AutoplayPermissionManager* aManager,
nsGlobalWindowInner* aWindow,
nsIPrincipal* aNodePrincipal,
nsIEventTarget* aMainThreadTarget);
nsIPrincipal* aNodePrincipal);
~AutoplayPermissionRequest();
WeakPtr<AutoplayPermissionManager> mManager;
nsCOMPtr<nsIEventTarget> mMainThreadTarget;
};
} // namespace mozilla