зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated code. This is because HTMLMediaElement includes MediaDecoder.h, and HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h predeclare rather than include fixes it. MozReview-Commit-ID: I0vrPgqvvge --HG-- extra : rebase_source : 505f9dce979aad0529b07d2c046dca5028af6de6
This commit is contained in:
Родитель
2e91854fcd
Коммит
60751f0b79
|
@ -22,7 +22,6 @@
|
||||||
#include "jsfriendapi.h"
|
#include "jsfriendapi.h"
|
||||||
#include "js/Value.h"
|
#include "js/Value.h"
|
||||||
#include "Layers.h"
|
#include "Layers.h"
|
||||||
#include "MediaDecoder.h"
|
|
||||||
#include "nsAppRunner.h"
|
#include "nsAppRunner.h"
|
||||||
// nsNPAPIPluginInstance must be included before nsIDocument.h, which is included in mozAutoDocUpdate.h.
|
// nsNPAPIPluginInstance must be included before nsIDocument.h, which is included in mozAutoDocUpdate.h.
|
||||||
#include "nsNPAPIPluginInstance.h"
|
#include "nsNPAPIPluginInstance.h"
|
||||||
|
@ -48,7 +47,6 @@
|
||||||
#include "mozilla/dom/FileSystemSecurity.h"
|
#include "mozilla/dom/FileSystemSecurity.h"
|
||||||
#include "mozilla/dom/FileBlobImpl.h"
|
#include "mozilla/dom/FileBlobImpl.h"
|
||||||
#include "mozilla/dom/HTMLInputElement.h"
|
#include "mozilla/dom/HTMLInputElement.h"
|
||||||
#include "mozilla/dom/HTMLMediaElement.h"
|
|
||||||
#include "mozilla/dom/HTMLTemplateElement.h"
|
#include "mozilla/dom/HTMLTemplateElement.h"
|
||||||
#include "mozilla/dom/HTMLContentElement.h"
|
#include "mozilla/dom/HTMLContentElement.h"
|
||||||
#include "mozilla/dom/HTMLShadowElement.h"
|
#include "mozilla/dom/HTMLShadowElement.h"
|
||||||
|
|
|
@ -7153,6 +7153,17 @@ HTMLMediaElement::NextFrameStatus()
|
||||||
return NEXT_FRAME_UNINITIALIZED;
|
return NEXT_FRAME_UNINITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
HTMLMediaElement::SetDecoder(MediaDecoder* aDecoder)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(aDecoder); // Use ShutdownDecoder() to clear.
|
||||||
|
if (mDecoder) {
|
||||||
|
ShutdownDecoder();
|
||||||
|
}
|
||||||
|
mDecoder = aDecoder;
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
HTMLMediaElement::ComputedVolume() const
|
HTMLMediaElement::ComputedVolume() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsIDOMHTMLMediaElement.h"
|
#include "nsIDOMHTMLMediaElement.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
|
#include "MediaEventSource.h"
|
||||||
|
#include "SeekTarget.h"
|
||||||
#include "MediaDecoderOwner.h"
|
#include "MediaDecoderOwner.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsIObserver.h"
|
#include "nsIObserver.h"
|
||||||
|
@ -18,7 +20,6 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/dom/TextTrackManager.h"
|
#include "mozilla/dom/TextTrackManager.h"
|
||||||
#include "mozilla/WeakPtr.h"
|
#include "mozilla/WeakPtr.h"
|
||||||
#include "MediaDecoder.h"
|
|
||||||
#include "mozilla/dom/MediaKeys.h"
|
#include "mozilla/dom/MediaKeys.h"
|
||||||
#include "mozilla/StateWatching.h"
|
#include "mozilla/StateWatching.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
@ -49,6 +50,9 @@ class DOMMediaStream;
|
||||||
class ErrorResult;
|
class ErrorResult;
|
||||||
class MediaResource;
|
class MediaResource;
|
||||||
class MediaDecoder;
|
class MediaDecoder;
|
||||||
|
class MediaInputPort;
|
||||||
|
class MediaStream;
|
||||||
|
class MediaStreamGraph;
|
||||||
class VideoFrameContainer;
|
class VideoFrameContainer;
|
||||||
namespace dom {
|
namespace dom {
|
||||||
class MediaKeys;
|
class MediaKeys;
|
||||||
|
@ -808,13 +812,7 @@ protected:
|
||||||
|
|
||||||
MediaDecoderOwner::NextFrameStatus NextFrameStatus();
|
MediaDecoderOwner::NextFrameStatus NextFrameStatus();
|
||||||
|
|
||||||
void SetDecoder(MediaDecoder* aDecoder) {
|
void SetDecoder(MediaDecoder* aDecoder);
|
||||||
MOZ_ASSERT(aDecoder); // Use ShutdownDecoder() to clear.
|
|
||||||
if (mDecoder) {
|
|
||||||
ShutdownDecoder();
|
|
||||||
}
|
|
||||||
mDecoder = aDecoder;
|
|
||||||
}
|
|
||||||
|
|
||||||
class WakeLockBoolWrapper {
|
class WakeLockBoolWrapper {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
#include "mozilla/dom/HTMLMediaElement.h"
|
#include "mozilla/dom/HTMLMediaElement.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
class FrameStatistics;
|
||||||
|
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class WakeLock;
|
class WakeLock;
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "nsProxyRelease.h"
|
#include "nsProxyRelease.h"
|
||||||
#include "nsIContentPolicy.h"
|
#include "nsIContentPolicy.h"
|
||||||
|
#include "mozilla/ErrorNames.h"
|
||||||
|
|
||||||
using mozilla::media::TimeUnit;
|
using mozilla::media::TimeUnit;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче