Bug 841493 - Rename nsHTMLMediaElement to HTMLMediaElement, r=Ms2ger

--HG--
rename : content/html/content/public/nsHTMLMediaElement.h => content/html/content/public/HTMLMediaElement.h
rename : content/html/content/src/nsHTMLMediaElement.cpp => content/html/content/src/HTMLMediaElement.cpp
This commit is contained in:
Andrea Marchesini 2013-03-19 13:23:54 +01:00
Родитель 0bf81a6aff
Коммит eb3d295f7f
33 изменённых файлов: 370 добавлений и 360 удалений

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

@ -284,7 +284,7 @@ public:
// - HTMLFrameSetElement: mRowSpecs, mColSpecs
// - nsHTMLInputElement: mInputData, mFiles, mFileList, mStaticDocfileList
// - nsHTMLMapElement: mAreas
// - nsHTMLMediaElement: many!
// - HTMLMediaElement: many!
// - nsHTMLOutputElement: mDefaultValue, mTokenList
// - nsHTMLRowElement: mCells
// - nsHTMLSelectElement: mOptions, mRestoreState
@ -360,7 +360,7 @@ public:
/** data nodes (comments, PIs, text). Nodes of this type always
returns a non-null value for nsIContent::GetText() */
eDATA_NODE = 1 << 8,
/** nsHTMLMediaElement */
/** HTMLMediaElement */
eMEDIA = 1 << 9,
/** animation elements */
eANIMATION = 1 << 10,

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

@ -168,7 +168,7 @@
#include "nsIBidiKeyboard.h"
#endif
#ifdef MOZ_MEDIA
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#endif
extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end,

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

@ -147,7 +147,7 @@
#include "nsHtml5TreeOpExecutor.h"
#include "nsIDOMElementReplaceEvent.h"
#ifdef MOZ_MEDIA
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#endif // MOZ_MEDIA
#ifdef MOZ_WEBRTC
#include "IPeerConnection.h"
@ -3979,7 +3979,7 @@ NotifyActivityChanged(nsIContent *aContent, void *aUnused)
#ifdef MOZ_MEDIA
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aContent));
if (domMediaElem) {
nsHTMLMediaElement* mediaElem = static_cast<nsHTMLMediaElement*>(aContent);
HTMLMediaElement* mediaElem = static_cast<HTMLMediaElement*>(aContent);
mediaElem->NotifyOwnerDocumentActivityChanged();
}
#endif
@ -8955,7 +8955,7 @@ NotifyAudioAvailableListener(nsIContent *aContent, void *aUnused)
#ifdef MOZ_MEDIA
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aContent));
if (domMediaElem) {
nsHTMLMediaElement* mediaElem = static_cast<nsHTMLMediaElement*>(aContent);
HTMLMediaElement* mediaElem = static_cast<HTMLMediaElement*>(aContent);
mediaElem->NotifyAudioAvailableListener();
}
#endif

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

@ -25,7 +25,7 @@
#include "nsBindingManager.h"
#include "nsGenericHTMLElement.h"
#ifdef MOZ_MEDIA
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#endif // MOZ_MEDIA
#include "nsWrapperCacheInlines.h"
#include "nsObjectLoadingContent.h"
@ -508,7 +508,7 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
#ifdef MOZ_MEDIA
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aNode));
if (domMediaElem) {
nsHTMLMediaElement* mediaElem = static_cast<nsHTMLMediaElement*>(aNode);
HTMLMediaElement* mediaElem = static_cast<HTMLMediaElement*>(aNode);
mediaElem->NotifyOwnerDocumentActivityChanged();
}
#endif

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

@ -3,8 +3,8 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if !defined(nsHTMLMediaElement_h__)
#define nsHTMLMediaElement_h__
#ifndef mozilla_dom_HTMLMediaElement_h
#define mozilla_dom_HTMLMediaElement_h
#include "nsIDOMHTMLMediaElement.h"
#include "nsGenericHTMLElement.h"
@ -39,10 +39,13 @@ class MediaResource;
class MediaDecoder;
}
class nsHTMLMediaElement : public nsGenericHTMLElement,
public nsIObserver,
public mozilla::MediaDecoderOwner,
public nsIAudioChannelAgentCallback
namespace mozilla {
namespace dom {
class HTMLMediaElement : public nsGenericHTMLElement,
public nsIObserver,
public MediaDecoderOwner,
public nsIAudioChannelAgentCallback
{
public:
typedef mozilla::TimeStamp TimeStamp;
@ -52,16 +55,13 @@ public:
typedef mozilla::MediaResource MediaResource;
typedef mozilla::MediaDecoderOwner MediaDecoderOwner;
typedef mozilla::MetadataTags MetadataTags;
typedef mozilla::AudioStream AudioStream;
typedef mozilla::MediaDecoder MediaDecoder;
typedef mozilla::DOMMediaStream DOMMediaStream;
mozilla::CORSMode GetCORSMode() {
CORSMode GetCORSMode() {
return mCORSMode;
}
nsHTMLMediaElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~nsHTMLMediaElement();
HTMLMediaElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~HTMLMediaElement();
/**
* This is used when the browser is constructing a video element to play
@ -82,7 +82,7 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLMediaElement,
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLMediaElement,
nsGenericHTMLElement)
virtual bool ParseAttribute(int32_t aNamespaceID,
@ -194,7 +194,7 @@ public:
// Called by the media decoder and the video frame to get the
// ImageContainer containing the video data.
virtual VideoFrameContainer* GetVideoFrameContainer() MOZ_FINAL MOZ_OVERRIDE;
ImageContainer* GetImageContainer();
layers::ImageContainer* GetImageContainer();
// Called by the video frame to get the print surface, if this is
// a static document and we're not actually playing video
@ -255,7 +255,7 @@ public:
// Returns the CanPlayStatus indicating if we can handle the
// full MIME type including the optional codecs parameter.
static mozilla::CanPlayStatus GetCanPlay(const nsAString& aType);
static CanPlayStatus GetCanPlay(const nsAString& aType);
/**
* Called when a child source element is added to this media element. This
@ -296,7 +296,7 @@ public:
*/
bool GetPlayedOrSeeked() const { return mHasPlayedOrSeeked; }
nsresult CopyInnerTo(mozilla::dom::Element* aDest);
nsresult CopyInnerTo(Element* aDest);
/**
* Sets the Accept header on the HTTP channel to the required
@ -334,13 +334,13 @@ protected:
class WakeLockBoolWrapper {
public:
WakeLockBoolWrapper(bool val = false) : mValue(val), mOuter(NULL), mWakeLock(NULL) {}
void SetOuter(nsHTMLMediaElement* outer) { mOuter = outer; }
void SetOuter(HTMLMediaElement* outer) { mOuter = outer; }
operator bool() { return mValue; }
WakeLockBoolWrapper& operator=(bool val);
bool operator !() const { return !mValue; }
private:
bool mValue;
nsHTMLMediaElement* mOuter;
HTMLMediaElement* mOuter;
nsCOMPtr<nsIDOMMozWakeLock> mWakeLock;
};
@ -415,7 +415,7 @@ protected:
* Call this to find a media element with the same NodePrincipal and mLoadingSrc
* set to aURI, and with a decoder on which Load() has been called.
*/
nsHTMLMediaElement* LookupMediaElementURITable(nsIURI* aURI);
HTMLMediaElement* LookupMediaElementURITable(nsIURI* aURI);
/**
* Shutdown and clear mDecoder and maintain associated invariants.
@ -595,9 +595,9 @@ protected:
*/
void SuspendOrResumeElement(bool aPauseElement, bool aSuspendEvents);
// Get the nsHTMLMediaElement object if the decoder is being used from an
// Get the HTMLMediaElement object if the decoder is being used from an
// HTML media element, and null otherwise.
virtual nsHTMLMediaElement* GetMediaElement() MOZ_FINAL MOZ_OVERRIDE
virtual HTMLMediaElement* GetMediaElement() MOZ_FINAL MOZ_OVERRIDE
{
return this;
}
@ -771,7 +771,7 @@ protected:
nsAutoPtr<AudioStream> mAudioStream;
// Range of time played.
mozilla::dom::TimeRanges mPlayed;
TimeRanges mPlayed;
// Stores the time at the start of the current 'played' range.
double mCurrentPlayRangeStart;
@ -880,7 +880,7 @@ protected:
bool mMediaSecurityVerified;
// The CORS mode when loading the media element
mozilla::CORSMode mCORSMode;
CORSMode mCORSMode;
// True if the media has an audio track
bool mHasAudio;
@ -889,7 +889,7 @@ protected:
bool mDownloadSuspendedByCache;
// Audio Channel Type.
mozilla::dom::AudioChannelType mAudioChannelType;
AudioChannelType mAudioChannelType;
// The audiochannel has been suspended.
bool mChannelSuspended;
@ -901,4 +901,7 @@ protected:
nsCOMPtr<nsIAudioChannelAgent> mAudioChannelAgent;
};
#endif
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_HTMLMediaElement_h

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

@ -22,7 +22,6 @@ EXPORTS = \
nsITextControlElement.h \
nsFormSubmission.h \
nsHTMLAudioElement.h \
nsHTMLMediaElement.h \
nsHTMLVideoElement.h \
nsIHTMLCollection.h \
$(NULL)
@ -31,6 +30,7 @@ EXPORTS_NAMESPACES = mozilla/dom
EXPORTS_mozilla/dom = \
HTMLCanvasElement.h \
HTMLMediaElement.h \
$(NULL)
include $(topsrcdir)/config/rules.mk

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

@ -8,12 +8,12 @@
#include "nsIDOMHTMLAudioElement.h"
#include "nsIJSNativeInitializer.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
typedef uint16_t nsMediaNetworkState;
typedef uint16_t nsMediaReadyState;
class nsHTMLAudioElement : public nsHTMLMediaElement,
class nsHTMLAudioElement : public mozilla::dom::HTMLMediaElement,
public nsIDOMHTMLAudioElement,
public nsIJSNativeInitializer
{
@ -34,8 +34,8 @@ public:
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMediaElement
using nsHTMLMediaElement::GetPaused;
NS_FORWARD_NSIDOMHTMLMEDIAELEMENT(nsHTMLMediaElement::)
using mozilla::dom::HTMLMediaElement::GetPaused;
NS_FORWARD_NSIDOMHTMLMEDIAELEMENT(mozilla::dom::HTMLMediaElement::)
// nsIDOMHTMLAudioElement
NS_DECL_NSIDOMHTMLAUDIOELEMENT

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

@ -7,9 +7,9 @@
#define nsHTMLVideoElement_h__
#include "nsIDOMHTMLVideoElement.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
class nsHTMLVideoElement : public nsHTMLMediaElement,
class nsHTMLVideoElement : public mozilla::dom::HTMLMediaElement,
public nsIDOMHTMLVideoElement
{
public:
@ -31,8 +31,8 @@ public:
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMediaElement
using nsHTMLMediaElement::GetPaused;
NS_FORWARD_NSIDOMHTMLMEDIAELEMENT(nsHTMLMediaElement::)
using mozilla::dom::HTMLMediaElement::GetPaused;
NS_FORWARD_NSIDOMHTMLMEDIAELEMENT(mozilla::dom::HTMLMediaElement::)
// nsIDOMHTMLVideoElement
NS_DECL_NSIDOMHTMLVIDEOELEMENT

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -70,7 +70,7 @@ HTMLSourceElement::BindToTree(nsIDocument *aDocument,
if (!aParent || !aParent->IsNodeOfType(nsINode::eMEDIA))
return NS_OK;
nsHTMLMediaElement* media = static_cast<nsHTMLMediaElement*>(aParent);
HTMLMediaElement* media = static_cast<HTMLMediaElement*>(aParent);
media->NotifyAddedSource();
return NS_OK;

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

@ -9,7 +9,7 @@
#include "nsIDOMHTMLSourceElement.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
namespace mozilla {
namespace dom {

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

@ -161,7 +161,7 @@ EXPORTS_mozilla/dom += \
CPPSRCS += \
nsHTMLAudioElement.cpp \
nsHTMLMediaElement.cpp \
HTMLMediaElement.cpp \
MediaError.cpp \
HTMLSourceElement.cpp \
TimeRanges.cpp \

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

@ -21,7 +21,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MediaError)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMMediaError)
NS_INTERFACE_MAP_END
MediaError::MediaError(nsHTMLMediaElement* aParent, uint16_t aCode)
MediaError::MediaError(HTMLMediaElement* aParent, uint16_t aCode)
: mParent(aParent)
, mCode(aCode)
{

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

@ -8,7 +8,7 @@
#define mozilla_dom_MediaError_h
#include "nsIDOMMediaError.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "nsWrapperCache.h"
#include "nsISupports.h"
#include "mozilla/Attributes.h"
@ -20,7 +20,7 @@ class MediaError MOZ_FINAL : public nsIDOMMediaError,
public nsWrapperCache
{
public:
MediaError(nsHTMLMediaElement* aParent, uint16_t aCode);
MediaError(HTMLMediaElement* aParent, uint16_t aCode);
// nsISupports
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@ -29,7 +29,7 @@ public:
// nsIDOMMediaError
NS_DECL_NSIDOMMEDIAERROR
nsHTMLMediaElement* GetParentObject() const
HTMLMediaElement* GetParentObject() const
{
return mParent;
}
@ -42,7 +42,7 @@ public:
}
private:
nsRefPtr<nsHTMLMediaElement> mParent;
nsRefPtr<HTMLMediaElement> mParent;
// Error code
const uint16_t mCode;

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

@ -6,7 +6,7 @@
#include "mozilla/dom/TimeRanges.h"
#include "mozilla/dom/TimeRangesBinding.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "nsContentUtils.h"
#include "nsDOMClassInfoID.h"
#include "nsError.h"

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

@ -50,8 +50,8 @@ NS_NewHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo,
return new nsHTMLAudioElement(nodeInfo.forget());
}
NS_IMPL_ADDREF_INHERITED(nsHTMLAudioElement, nsHTMLMediaElement)
NS_IMPL_RELEASE_INHERITED(nsHTMLAudioElement, nsHTMLMediaElement)
NS_IMPL_ADDREF_INHERITED(nsHTMLAudioElement, HTMLMediaElement)
NS_IMPL_RELEASE_INHERITED(nsHTMLAudioElement, HTMLMediaElement)
DOMCI_NODE_DATA(HTMLAudioElement, nsHTMLAudioElement)
@ -59,14 +59,14 @@ NS_INTERFACE_TABLE_HEAD(nsHTMLAudioElement)
NS_HTML_CONTENT_INTERFACE_TABLE3(nsHTMLAudioElement, nsIDOMHTMLMediaElement,
nsIDOMHTMLAudioElement, nsIJSNativeInitializer)
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLAudioElement,
nsHTMLMediaElement)
HTMLMediaElement)
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLAudioElement)
NS_IMPL_ELEMENT_CLONE(nsHTMLAudioElement)
nsHTMLAudioElement::nsHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsHTMLMediaElement(aNodeInfo)
: HTMLMediaElement(aNodeInfo)
{
}

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

@ -37,15 +37,15 @@ using namespace mozilla::dom;
NS_IMPL_NS_NEW_HTML_ELEMENT(Video)
NS_IMPL_ADDREF_INHERITED(nsHTMLVideoElement, nsHTMLMediaElement)
NS_IMPL_RELEASE_INHERITED(nsHTMLVideoElement, nsHTMLMediaElement)
NS_IMPL_ADDREF_INHERITED(nsHTMLVideoElement, HTMLMediaElement)
NS_IMPL_RELEASE_INHERITED(nsHTMLVideoElement, HTMLMediaElement)
DOMCI_NODE_DATA(HTMLVideoElement, nsHTMLVideoElement)
NS_INTERFACE_TABLE_HEAD(nsHTMLVideoElement)
NS_HTML_CONTENT_INTERFACE_TABLE2(nsHTMLVideoElement, nsIDOMHTMLMediaElement, nsIDOMHTMLVideoElement)
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLVideoElement,
nsHTMLMediaElement)
HTMLMediaElement)
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLVideoElement)
NS_IMPL_ELEMENT_CLONE(nsHTMLVideoElement)
@ -70,7 +70,7 @@ NS_IMETHODIMP nsHTMLVideoElement::GetVideoHeight(uint32_t *aVideoHeight)
}
nsHTMLVideoElement::nsHTMLVideoElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsHTMLMediaElement(aNodeInfo)
: HTMLMediaElement(aNodeInfo)
{
}
@ -99,8 +99,8 @@ nsHTMLVideoElement::ParseAttribute(int32_t aNamespaceID,
return aResult.ParseSpecialIntValue(aValue);
}
return nsHTMLMediaElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aResult);
return HTMLMediaElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aResult);
}
static void
@ -180,7 +180,7 @@ NS_IMETHODIMP nsHTMLVideoElement::GetMozPresentedFrames(uint32_t *aMozPresentedF
NS_IMETHODIMP nsHTMLVideoElement::GetMozPaintedFrames(uint32_t *aMozPaintedFrames)
{
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
ImageContainer* container = GetImageContainer();
layers::ImageContainer* container = GetImageContainer();
*aMozPaintedFrames = container ? container->GetPaintCount() : 0;
return NS_OK;
}

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

@ -7,7 +7,7 @@
#include "nsGkAtoms.h"
#include "nsNodeInfoManager.h"
#include "nsContentCreatorFunctions.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "nsIDocumentInlines.h"
#include "nsContentUtils.h"
#include "mozilla/dom/Element.h"
@ -101,9 +101,9 @@ VideoDocument::CreateSyntheticVideoDocument(nsIChannel* aChannel,
nsIDOMNode::ELEMENT_NODE);
NS_ENSURE_TRUE(nodeInfo, NS_ERROR_FAILURE);
nsRefPtr<nsHTMLMediaElement> element =
static_cast<nsHTMLMediaElement*>(NS_NewHTMLVideoElement(nodeInfo.forget(),
NOT_FROM_PARSER));
nsRefPtr<HTMLMediaElement> element =
static_cast<HTMLMediaElement*>(NS_NewHTMLVideoElement(nodeInfo.forget(),
NOT_FROM_PARSER));
if (!element)
return NS_ERROR_OUT_OF_MEMORY;
element->SetAutoplay(true);

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

@ -7,12 +7,14 @@
#define MediaDecoderOwner_h_
#include "AbstractMediaDecoder.h"
class nsHTMLMediaElement;
namespace mozilla {
class VideoFrameContainer;
namespace dom {
class HTMLMediaElement;
}
class MediaDecoderOwner
{
public:
@ -34,9 +36,9 @@ public:
*/
virtual void FireTimeUpdate(bool aPeriodic) = 0;
// Get the nsHTMLMediaElement object if the decoder is being used from an
// Get the HTMLMediaElement object if the decoder is being used from an
// HTML media element, and null otherwise.
virtual nsHTMLMediaElement* GetMediaElement()
virtual dom::HTMLMediaElement* GetMediaElement()
{
return nullptr;
}

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

@ -14,7 +14,7 @@
#include "ImageLayers.h"
#include "AudioSampleFormat.h"
#include "MediaResource.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
namespace mozilla {

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

@ -23,7 +23,7 @@
#include "nsIStreamListener.h"
#include "nsIScriptSecurityManager.h"
#include "nsCrossSiteListenerProxy.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "nsError.h"
#include "nsICachingChannel.h"
#include "nsURILoader.h"
@ -152,7 +152,7 @@ ChannelMediaResource::OnStartRequest(nsIRequest* aRequest)
MediaDecoderOwner* owner = mDecoder->GetMediaOwner();
NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE);
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
NS_ENSURE_TRUE(element, NS_ERROR_FAILURE);
nsresult status;
nsresult rv = aRequest->GetStatus(&status);
@ -610,7 +610,7 @@ nsresult ChannelMediaResource::OpenChannel(nsIStreamListener** aStreamListener)
// an authorizing Access-Control header.
MediaDecoderOwner* owner = mDecoder->GetMediaOwner();
NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE);
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
NS_ENSURE_TRUE(element, NS_ERROR_FAILURE);
if (element->ShouldCheckAllowOrigin()) {
nsRefPtr<nsCORSListenerProxy> crossSiteListener =
@ -669,7 +669,7 @@ void ChannelMediaResource::SetupChannelHeaders()
if (!owner) {
return;
}
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
if (!element) {
return;
}
@ -818,7 +818,7 @@ void ChannelMediaResource::Suspend(bool aCloseImmediately)
// Shutting down; do nothing.
return;
}
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
if (!element) {
// Shutting down; do nothing.
return;
@ -853,7 +853,7 @@ void ChannelMediaResource::Resume()
// Shutting down; do nothing.
return;
}
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
if (!element) {
// Shutting down; do nothing.
return;
@ -902,7 +902,7 @@ ChannelMediaResource::RecreateChannel()
// The decoder is being shut down, so don't bother opening a new channel
return NS_OK;
}
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
if (!element) {
// The decoder is being shut down, so don't bother opening a new channel
return NS_OK;
@ -1430,7 +1430,7 @@ nsresult FileMediaResource::Open(nsIStreamListener** aStreamListener)
// web server.
MediaDecoderOwner* owner = mDecoder->GetMediaOwner();
NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE);
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
NS_ENSURE_TRUE(element, NS_ERROR_FAILURE);
rv = nsContentUtils::GetSecurityManager()->
@ -1495,7 +1495,7 @@ MediaResource* FileMediaResource::CloneData(MediaDecoder* aDecoder)
// The decoder is being shut down, so we can't clone
return nullptr;
}
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
if (!element) {
// The decoder is being shut down, so we can't clone
return nullptr;
@ -1610,7 +1610,7 @@ void BaseMediaResource::MoveLoadsToBackground() {
NS_WARNING("Null owner in MediaResource::MoveLoadsToBackground()");
return;
}
nsHTMLMediaElement* element = owner->GetMediaElement();
HTMLMediaElement* element = owner->GetMediaElement();
if (!element) {
NS_WARNING("Null element in MediaResource::MoveLoadsToBackground()");
return;

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

@ -6,7 +6,7 @@
#include "VideoFrameContainer.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "nsIFrame.h"
#include "nsDisplayList.h"
#include "nsSVGEffects.h"
@ -16,7 +16,7 @@ using namespace mozilla::layers;
namespace mozilla {
VideoFrameContainer::VideoFrameContainer(nsHTMLMediaElement* aElement,
VideoFrameContainer::VideoFrameContainer(dom::HTMLMediaElement* aElement,
already_AddRefed<ImageContainer> aContainer)
: mElement(aElement),
mImageContainer(aContainer), mMutex("nsVideoFrameContainer"),

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

@ -14,10 +14,12 @@
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
class nsHTMLMediaElement;
namespace mozilla {
namespace dom {
class HTMLMediaElement;
}
namespace layers {
class Image;
class ImageContainer;
@ -34,12 +36,12 @@ class ImageContainer;
*/
class VideoFrameContainer {
public:
typedef mozilla::layers::ImageContainer ImageContainer;
typedef mozilla::layers::Image Image;
typedef layers::ImageContainer ImageContainer;
typedef layers::Image Image;
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VideoFrameContainer)
VideoFrameContainer(nsHTMLMediaElement* aElement,
VideoFrameContainer(dom::HTMLMediaElement* aElement,
already_AddRefed<ImageContainer> aContainer);
~VideoFrameContainer();
@ -61,7 +63,7 @@ public:
protected:
// Non-addreffed pointer to the element. The element calls ForgetElement
// to clear this reference when the element is destroyed.
nsHTMLMediaElement* mElement;
dom::HTMLMediaElement* mElement;
nsRefPtr<ImageContainer> mImageContainer;
// mMutex protects all the fields below.

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

@ -10,11 +10,11 @@
* DASH is an adaptive bitrate streaming technology where a multimedia file is
* partitioned into one or more segments and delivered to a client using HTTP.
*
* Interaction with MediaDecoderStateMachine, nsHTMLMediaElement,
* Interaction with MediaDecoderStateMachine, HTMLMediaElement,
* ChannelMediaResource and sub-decoders (WebMDecoder).
*
*
* MediaDecoderStateMachine nsHTMLMediaElement
* MediaDecoderStateMachine HTMLMediaElement
* 1 / \ 1 / 1
* / \ /
* 1 / \ 1 / 1
@ -81,7 +81,7 @@
* -- At this point the Segment media stream downloads are managed by
* individual |ChannelMediaResource|s and |WebMReader|s.
* A single |DASHDecoder| and |MediaDecoderStateMachine| manage them
* and communicate to |nsHTMLMediaElement|.
* and communicate to |HTMLMediaElement|.
*
* Each |DASHRepDecoder| gets init range and index range from its MPD
* |Representation|. |DASHRepDecoder| uses ChannelMediaResource to start the
@ -565,7 +565,7 @@ DASHDecoder::CreateSubChannel(nsIURI* aUrl, nsIChannel** aChannel)
NS_ENSURE_ARG(aUrl);
NS_ENSURE_TRUE(mOwner, NS_ERROR_NULL_POINTER);
nsHTMLMediaElement* element = mOwner->GetMediaElement();
HTMLMediaElement* element = mOwner->GetMediaElement();
NS_ENSURE_TRUE(element, NS_ERROR_NULL_POINTER);
nsCOMPtr<nsILoadGroup> loadGroup =

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

@ -196,7 +196,7 @@ DASHReader::ReadMetadata(VideoInfo* aInfo,
// Read metadata for all video streams.
for (uint i = 0; i < mVideoReaders.Length(); i++) {
// Use an nsAutoPtr here to ensure |tags| memory does not leak.
nsAutoPtr<nsHTMLMediaElement::MetadataTags> tags;
nsAutoPtr<HTMLMediaElement::MetadataTags> tags;
rv = mVideoReaders[i]->ReadMetadata(&videoInfo, getter_Transfers(tags));
NS_ENSURE_SUCCESS(rv, rv);
// Use metadata from current video sub reader to populate aInfo.

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

@ -17,7 +17,7 @@
#include <opus/opus.h>
#include "opus/opus_multistream.h"
// For MOZ_SAMPLE_TYPE_*
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "MediaDecoderStateMachine.h"
#include "MediaDecoderReader.h"
#endif

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

@ -7,7 +7,7 @@
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/TimeRanges.h"
#include "MediaResource.h"
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "MediaPluginHost.h"
#include "nsXPCOMStrings.h"
#include "nsISeekableStream.h"

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

@ -33,7 +33,7 @@ function checkPlaybackRate(wallclock, media, expected, threshold) {
return false;
}
// Those value are expected to match those at the top of nsHTMLMediaElement.cpp.
// Those value are expected to match those at the top of HTMLMediaElement.cpp.
let VERY_SLOW_RATE = 0.1,
SLOW_RATE = 0.25,
FAST_RATE = 5,

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

@ -140,7 +140,7 @@ nsresult WaveReader::ReadMetadata(VideoInfo* aInfo,
return NS_ERROR_FAILURE;
}
nsAutoPtr<nsHTMLMediaElement::MetadataTags> tags;
nsAutoPtr<HTMLMediaElement::MetadataTags> tags;
bool loadAllChunks = LoadAllChunks(tags);
if (!loadAllChunks) {
@ -531,7 +531,7 @@ WaveReader::GetNextChunk(uint32_t* aChunk, uint32_t* aChunkSize)
bool
WaveReader::LoadListChunk(uint32_t aChunkSize,
nsAutoPtr<nsHTMLMediaElement::MetadataTags> &aTags)
nsAutoPtr<HTMLMediaElement::MetadataTags> &aTags)
{
// List chunks are always word (two byte) aligned.
NS_ABORT_IF_FALSE(mDecoder->GetResource()->Tell() % 2 == 0,
@ -564,7 +564,7 @@ WaveReader::LoadListChunk(uint32_t aChunkSize,
const char* const end = chunk.get() + aChunkSize;
aTags = new nsHTMLMediaElement::MetadataTags;
aTags = new HTMLMediaElement::MetadataTags;
aTags->Init();
while (p + 8 < end) {
@ -605,7 +605,7 @@ WaveReader::LoadListChunk(uint32_t aChunkSize,
}
bool
WaveReader::LoadAllChunks(nsAutoPtr<nsHTMLMediaElement::MetadataTags> &aTags)
WaveReader::LoadAllChunks(nsAutoPtr<HTMLMediaElement::MetadataTags> &aTags)
{
// Chunks are always word (two byte) aligned.
NS_ABORT_IF_FALSE(mDecoder->GetResource()->Tell() % 2 == 0,

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

@ -53,8 +53,8 @@ private:
bool GetNextChunk(uint32_t* aChunk, uint32_t* aChunkSize);
bool LoadFormatChunk(uint32_t aChunkSize);
bool FindDataOffset(uint32_t aChunkSize);
bool LoadListChunk(uint32_t aChunkSize, nsAutoPtr<nsHTMLMediaElement::MetadataTags> &aTags);
bool LoadAllChunks(nsAutoPtr<nsHTMLMediaElement::MetadataTags> &aTags);
bool LoadListChunk(uint32_t aChunkSize, nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags);
bool LoadAllChunks(nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags);
// Returns the number of seconds that aBytes represents based on the
// current audio parameters. e.g. 176400 bytes is 1 second at 16-bit

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

@ -397,7 +397,7 @@ MediaDecodeTask::CreateReader()
mBufferDecoder = new BufferDecoder(resource);
// If you change this list to add support for new decoders, please consider
// updating nsHTMLMediaElement::CreateDecoder as well.
// updating HTMLMediaElement::CreateDecoder as well.
mDecoderReader = DecoderTraits::CreateReader(mContentType, mBufferDecoder);

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

@ -117,7 +117,7 @@
#include "gfxImageSurface.h"
#include "gfxContext.h"
#ifdef MOZ_MEDIA
#include "nsHTMLMediaElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#endif
#include "nsSMILAnimationController.h"
#include "SVGContentUtils.h"

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

@ -399,8 +399,8 @@ public:
// cheap (i.e. hardware accelerated).
return LAYER_ACTIVE;
}
nsHTMLMediaElement* elem =
static_cast<nsHTMLMediaElement*>(mFrame->GetContent());
HTMLMediaElement* elem =
static_cast<HTMLMediaElement*>(mFrame->GetContent());
return elem->IsPotentiallyPlaying() ? LAYER_ACTIVE_FORCE : LAYER_INACTIVE;
}
};