mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 840559 - Rename nsMediaError to MediaError. r=Ms2ger
--HG-- rename : content/html/content/src/nsMediaError.cpp => content/html/content/src/MediaError.cpp rename : content/html/content/src/nsMediaError.h => content/html/content/src/MediaError.h
This commit is contained in:
parent
e08bf536bc
commit
9760ea465e
@ -142,12 +142,13 @@ CPPSRCS = \
|
||||
ifdef MOZ_MEDIA
|
||||
EXPORTS_mozilla/dom += \
|
||||
HTMLSourceElement.h \
|
||||
MediaError.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS += \
|
||||
nsHTMLAudioElement.cpp \
|
||||
nsHTMLMediaElement.cpp \
|
||||
nsMediaError.cpp \
|
||||
MediaError.cpp \
|
||||
nsMediaFragmentURIParser.cpp \
|
||||
HTMLSourceElement.cpp \
|
||||
nsTimeRanges.cpp \
|
||||
|
@ -3,29 +3,36 @@
|
||||
/* 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/. */
|
||||
#include "nsMediaError.h"
|
||||
|
||||
#include "mozilla/dom/MediaError.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
|
||||
NS_IMPL_ADDREF(nsMediaError)
|
||||
NS_IMPL_RELEASE(nsMediaError)
|
||||
DOMCI_DATA(MediaError, mozilla::dom::MediaError)
|
||||
|
||||
DOMCI_DATA(MediaError, nsMediaError)
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsMediaError)
|
||||
NS_IMPL_ADDREF(MediaError)
|
||||
NS_IMPL_RELEASE(MediaError)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(MediaError)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMMediaError)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MediaError)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
nsMediaError::nsMediaError(uint16_t aCode) :
|
||||
mCode(aCode)
|
||||
MediaError::MediaError(uint16_t aCode)
|
||||
: mCode(aCode)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMediaError::GetCode(uint16_t* aCode)
|
||||
NS_IMETHODIMP MediaError::GetCode(uint16_t* aCode)
|
||||
{
|
||||
if (aCode)
|
||||
*aCode = mCode;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
@ -3,14 +3,21 @@
|
||||
/* 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/. */
|
||||
|
||||
#ifndef mozilla_dom_MediaError_h
|
||||
#define mozilla_dom_MediaError_h
|
||||
|
||||
#include "nsIDOMMediaError.h"
|
||||
#include "nsISupports.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsMediaError MOZ_FINAL : public nsIDOMMediaError
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class MediaError MOZ_FINAL : public nsIDOMMediaError
|
||||
{
|
||||
public:
|
||||
nsMediaError(uint16_t aCode);
|
||||
MediaError(uint16_t aCode);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
@ -22,3 +29,8 @@ private:
|
||||
// Error code
|
||||
uint16_t mCode;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_MediaError_h
|
@ -38,7 +38,7 @@
|
||||
#include "nsITimer.h"
|
||||
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsMediaError.h"
|
||||
#include "MediaError.h"
|
||||
#include "MediaDecoder.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "MediaResource.h"
|
||||
@ -660,7 +660,7 @@ void nsHTMLMediaElement::NoSupportedMediaSourceError()
|
||||
{
|
||||
NS_ASSERTION(mDelayingLoadEvent, "Load event not delayed during source selection?");
|
||||
|
||||
mError = new nsMediaError(nsIDOMMediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
|
||||
mError = new MediaError(nsIDOMMediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
|
||||
mNetworkState = nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE;
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("error"));
|
||||
// This clears mDelayingLoadEvent, so AddRemoveSelfReference will be called
|
||||
@ -2740,7 +2740,7 @@ void nsHTMLMediaElement::Error(uint16_t aErrorCode)
|
||||
aErrorCode == nsIDOMMediaError::MEDIA_ERR_NETWORK ||
|
||||
aErrorCode == nsIDOMMediaError::MEDIA_ERR_ABORTED,
|
||||
"Only use nsIDOMMediaError codes!");
|
||||
mError = new nsMediaError(aErrorCode);
|
||||
mError = new MediaError(aErrorCode);
|
||||
mBegun = false;
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("error"));
|
||||
if (mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsIDOMProgressEvent.h"
|
||||
#include "nsMediaError.h"
|
||||
#include "MediaError.h"
|
||||
#include "MediaDecoder.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
Loading…
Reference in New Issue
Block a user