зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1347402 part 2 - open a GetOwnerDoc() interface at the MediaDecoderOwner; r=jwwang
Open a GetOwnerDoc() method to the MediaDecoderOwner interface and then we can get the owner document via a pointer to MediaDecoderOwner in MediaDecoder. MozReview-Commit-ID: JCzQDLx1MsU --HG-- extra : rebase_source : e194c95cb1513046ec7aa19d6c6e9f8231971a2d extra : source : 1b9c45911a036e3677b6636cda84a636681d71de
This commit is contained in:
Родитель
c8bd9d4d79
Коммит
a71c156f34
|
@ -7410,6 +7410,12 @@ HTMLMediaElement::NotifyDecoderActivityChanges() const
|
|||
}
|
||||
}
|
||||
|
||||
nsIDocument*
|
||||
HTMLMediaElement::GetDocument() const
|
||||
{
|
||||
return OwnerDoc();
|
||||
}
|
||||
|
||||
bool HasDebuggerPrivilege(JSContext* aCx, JSObject* aObj)
|
||||
{
|
||||
return nsContentUtils::CallerHasPermission(aCx,
|
||||
|
|
|
@ -774,6 +774,8 @@ public:
|
|||
};
|
||||
void MarkAsContentSource(CallerAPI aAPI);
|
||||
|
||||
nsIDocument* GetDocument() const override;
|
||||
|
||||
protected:
|
||||
virtual ~HTMLMediaElement();
|
||||
|
||||
|
|
|
@ -157,6 +157,9 @@ public:
|
|||
// Main thread only.
|
||||
virtual void DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
|
||||
const nsAString& aInitDataType) = 0;
|
||||
|
||||
// Return the decoder owner's owner document.
|
||||
virtual nsIDocument* GetDocument() const = 0;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
// Non-DocGroup version for Mock.
|
||||
return AbstractThread::MainThread();
|
||||
}
|
||||
nsIDocument* GetDocument() const { return nullptr; }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче