зеркало из 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:
Родитель
185ab4fc70
Коммит
fcd4613526
|
@ -22,7 +22,6 @@
|
|||
#include "jsfriendapi.h"
|
||||
#include "js/Value.h"
|
||||
#include "Layers.h"
|
||||
#include "MediaDecoder.h"
|
||||
#include "nsAppRunner.h"
|
||||
// nsNPAPIPluginInstance must be included before nsIDocument.h, which is included in mozAutoDocUpdate.h.
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
|
@ -48,7 +47,6 @@
|
|||
#include "mozilla/dom/FileSystemSecurity.h"
|
||||
#include "mozilla/dom/FileBlobImpl.h"
|
||||
#include "mozilla/dom/HTMLInputElement.h"
|
||||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
#include "mozilla/dom/HTMLTemplateElement.h"
|
||||
#include "mozilla/dom/HTMLContentElement.h"
|
||||
#include "mozilla/dom/HTMLShadowElement.h"
|
||||
|
|
|
@ -7153,6 +7153,17 @@ HTMLMediaElement::NextFrameStatus()
|
|||
return NEXT_FRAME_UNINITIALIZED;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HTMLMediaElement::SetDecoder(MediaDecoder* aDecoder)
|
||||
{
|
||||
MOZ_ASSERT(aDecoder); // Use ShutdownDecoder() to clear.
|
||||
if (mDecoder) {
|
||||
ShutdownDecoder();
|
||||
}
|
||||
mDecoder = aDecoder;
|
||||
}
|
||||
|
||||
float
|
||||
HTMLMediaElement::ComputedVolume() const
|
||||
{
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsIDOMHTMLMediaElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "MediaEventSource.h"
|
||||
#include "SeekTarget.h"
|
||||
#include "MediaDecoderOwner.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIObserver.h"
|
||||
|
@ -18,7 +20,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/TextTrackManager.h"
|
||||
#include "mozilla/WeakPtr.h"
|
||||
#include "MediaDecoder.h"
|
||||
#include "mozilla/dom/MediaKeys.h"
|
||||
#include "mozilla/StateWatching.h"
|
||||
#include "nsGkAtoms.h"
|
||||
|
@ -49,6 +50,9 @@ class DOMMediaStream;
|
|||
class ErrorResult;
|
||||
class MediaResource;
|
||||
class MediaDecoder;
|
||||
class MediaInputPort;
|
||||
class MediaStream;
|
||||
class MediaStreamGraph;
|
||||
class VideoFrameContainer;
|
||||
namespace dom {
|
||||
class MediaKeys;
|
||||
|
@ -808,13 +812,7 @@ protected:
|
|||
|
||||
MediaDecoderOwner::NextFrameStatus NextFrameStatus();
|
||||
|
||||
void SetDecoder(MediaDecoder* aDecoder) {
|
||||
MOZ_ASSERT(aDecoder); // Use ShutdownDecoder() to clear.
|
||||
if (mDecoder) {
|
||||
ShutdownDecoder();
|
||||
}
|
||||
mDecoder = aDecoder;
|
||||
}
|
||||
void SetDecoder(MediaDecoder* aDecoder);
|
||||
|
||||
class WakeLockBoolWrapper {
|
||||
public:
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class FrameStatistics;
|
||||
|
||||
namespace dom {
|
||||
|
||||
class WakeLock;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <algorithm>
|
||||
#include "nsProxyRelease.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "mozilla/ErrorNames.h"
|
||||
|
||||
using mozilla::media::TimeUnit;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче