Bug 984269 Rename nsDOMEventTargetHelper to mozilla::DOMEventTargetHelper r=smaug

--HG--
rename : dom/events/nsDOMEventTargetHelper.cpp => dom/events/DOMEventTargetHelper.cpp
rename : dom/events/nsDOMEventTargetHelper.h => dom/events/DOMEventTargetHelper.h
This commit is contained in:
Masayuki Nakano 2014-04-01 15:13:50 +09:00
parent dc2aceddef
commit 930436ef24
118 changed files with 601 additions and 592 deletions

View File

@ -7,6 +7,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/EventSourceBinding.h"
#include "mozilla/dom/MessageEvent.h"
@ -33,7 +34,6 @@
#include "xpcpublic.h"
#include "nsCrossSiteListenerProxy.h"
#include "nsWrapperCacheInlines.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/Attributes.h"
#include "nsError.h"
@ -56,7 +56,7 @@ namespace dom {
#define MAX_RECONNECTION_TIME_VALUE PR_IntervalToMilliseconds(DELAY_INTERVAL_LIMIT)
EventSource::EventSource(nsPIDOMWindow* aOwnerWindow) :
nsDOMEventTargetHelper(aOwnerWindow),
DOMEventTargetHelper(aOwnerWindow),
mStatus(PARSE_STATE_OFF),
mFrozen(false),
mErrorLoadOnRedirect(false),
@ -105,11 +105,11 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(EventSource)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(EventSource,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(EventSource,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSrc)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNotificationCallbacks)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mLoadGroup)
@ -119,7 +119,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(EventSource,
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mUnicodeDecoder)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(EventSource, nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(EventSource,
DOMEventTargetHelper)
tmp->Close();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
@ -130,15 +131,15 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(EventSource)
NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(EventSource, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(EventSource, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(EventSource, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(EventSource, DOMEventTargetHelper)
void
EventSource::DisconnectFromOwner()
{
nsDOMEventTargetHelper::DisconnectFromOwner();
DOMEventTargetHelper::DisconnectFromOwner();
Close();
}

View File

@ -14,7 +14,7 @@
#define mozilla_dom_EventSource_h
#include "mozilla/Attributes.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsIObserver.h"
#include "nsIStreamListener.h"
#include "nsIChannelEventSink.h"
@ -36,7 +36,7 @@ namespace dom {
class AsyncVerifyRedirectCallbackFwr;
struct EventSourceInit;
class EventSource : public nsDOMEventTargetHelper
class EventSource : public DOMEventTargetHelper
, public nsIObserver
, public nsIStreamListener
, public nsIChannelEventSink
@ -49,8 +49,8 @@ public:
EventSource(nsPIDOMWindow* aOwnerWindow);
virtual ~EventSource();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(EventSource,
nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
EventSource, DOMEventTargetHelper)
NS_DECL_NSIOBSERVER
NS_DECL_NSISTREAMLISTENER

View File

@ -20,26 +20,26 @@ namespace dom {
const uint64_t kUnknownSize = uint64_t(-1);
NS_IMPL_ADDREF_INHERITED(FileIOObject, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(FileIOObject, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(FileIOObject, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(FileIOObject, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FileIOObject)
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_CLASS(FileIOObject)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(FileIOObject,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mProgressNotifier)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mError)
// Can't traverse mChannel because it's a multithreaded object.
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(FileIOObject,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mProgressNotifier)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mError)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mChannel)

View File

@ -6,7 +6,7 @@
#ifndef FileIOObject_h__
#define FileIOObject_h__
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsIChannel.h"
#include "nsIFile.h"
#include "nsIDOMFile.h"
@ -28,7 +28,7 @@ extern const uint64_t kUnknownSize;
// A common base class for FileReader and FileSaver
class FileIOObject : public nsDOMEventTargetHelper,
class FileIOObject : public DOMEventTargetHelper,
public nsIStreamListener,
public nsITimerCallback
{
@ -65,8 +65,7 @@ public:
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileIOObject,
nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileIOObject, DOMEventTargetHelper)
protected:
// Implemented by the derived class to do whatever it needs to do for abort

View File

@ -10,6 +10,7 @@
#include "jsapi.h"
#include "jsfriendapi.h"
#include "js/OldDebugAPI.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsIScriptGlobalObject.h"
#include "nsIDOMWindow.h"
#include "nsIDocument.h"
@ -39,7 +40,6 @@
#include "nsContentPolicyUtils.h"
#include "nsDOMFile.h"
#include "nsWrapperCacheInlines.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIObserverService.h"
#include "nsIWebSocketChannel.h"
#include "GeneratedEvents.h"
@ -441,7 +441,7 @@ WebSocket::GetInterface(const nsIID& aIID, void** aResult)
////////////////////////////////////////////////////////////////////////////////
WebSocket::WebSocket(nsPIDOMWindow* aOwnerWindow)
: nsDOMEventTargetHelper(aOwnerWindow),
: DOMEventTargetHelper(aOwnerWindow),
mKeepingAlive(false),
mCheckMustKeepAlive(true),
mOnCloseScheduled(false),
@ -595,18 +595,18 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(WebSocket)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WebSocket,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WebSocket,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPrincipal)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mURI)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChannel)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WebSocket,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
tmp->Disconnect();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPrincipal)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mURI)
@ -619,15 +619,15 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WebSocket)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY(nsIRequest)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(WebSocket, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(WebSocket, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(WebSocket, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(WebSocket, DOMEventTargetHelper)
void
WebSocket::DisconnectFromOwner()
{
nsDOMEventTargetHelper::DisconnectFromOwner();
DOMEventTargetHelper::DisconnectFromOwner();
CloseConnection(nsIWebSocketChannel::CLOSE_GOING_AWAY);
DontKeepAliveAnyMore();
}

View File

@ -10,11 +10,11 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/WebSocketBinding.h" // for BinaryType
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/ErrorResult.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIInterfaceRequestor.h"
#include "nsIObserver.h"
#include "nsIRequest.h"
@ -32,7 +32,7 @@
namespace mozilla {
namespace dom {
class WebSocket : public nsDOMEventTargetHelper,
class WebSocket : public DOMEventTargetHelper,
public nsIInterfaceRequestor,
public nsIWebSocketListener,
public nsIObserver,
@ -52,8 +52,8 @@ public:
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(WebSocket,
nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
WebSocket, DOMEventTargetHelper)
NS_DECL_NSIINTERFACEREQUESTOR
NS_DECL_NSIWEBSOCKETLISTENER
NS_DECL_NSIOBSERVER

View File

@ -25,7 +25,7 @@ extern PRLogModuleInfo* GetDataChannelLog();
#include "nsIDOMFile.h"
#include "nsIDOMDataChannel.h"
#include "nsIDOMMessageEvent.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsError.h"
#include "nsAutoPtr.h"
@ -66,24 +66,24 @@ nsDOMDataChannel::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMDataChannel)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsDOMDataChannel,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsDOMDataChannel,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_ADDREF_INHERITED(nsDOMDataChannel, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMDataChannel, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsDOMDataChannel, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMDataChannel, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMDataChannel)
NS_INTERFACE_MAP_ENTRY(nsIDOMDataChannel)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
nsDOMDataChannel::nsDOMDataChannel(already_AddRefed<mozilla::DataChannel>& aDataChannel,
nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow && aWindow->IsOuterWindow() ?
aWindow->GetCurrentInnerWindow() : aWindow)
: DOMEventTargetHelper(aWindow && aWindow->IsOuterWindow() ?
aWindow->GetCurrentInnerWindow() : aWindow)
, mDataChannel(aDataChannel)
, mBinaryType(DC_BINARY_TYPE_BLOB)
{

View File

@ -8,10 +8,10 @@
#define nsDOMDataChannel_h
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/DataChannelBinding.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/net/DataChannelListener.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIDOMDataChannel.h"
#include "nsIInputStream.h"
@ -20,7 +20,7 @@ namespace mozilla {
class DataChannel;
};
class nsDOMDataChannel : public nsDOMEventTargetHelper,
class nsDOMDataChannel : public mozilla::DOMEventTargetHelper,
public nsIDOMDataChannel,
public mozilla::DataChannelListener
{
@ -34,10 +34,10 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMDATACHANNEL
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMDataChannel,
nsDOMEventTargetHelper)
mozilla::DOMEventTargetHelper)
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
MOZ_OVERRIDE;

View File

@ -35,13 +35,13 @@
#include "nsIScriptObjectPrincipal.h"
#include "nsHostObjectProtocolHandler.h"
#include "mozilla/Base64.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/Preferences.h"
#include "mozilla/dom/EncodingUtils.h"
#include "mozilla/dom/FileReaderBinding.h"
#include "xpcpublic.h"
#include "nsIScriptSecurityManager.h"
#include "nsDOMJSUtils.h"
#include "nsDOMEventTargetHelper.h"
#include "jsfriendapi.h"
@ -69,7 +69,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(nsDOMFileReader,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mResultArrayBuffer)
NS_IMPL_CYCLE_COLLECTION_TRACE_END

View File

@ -43,7 +43,7 @@ public:
NS_DECL_NSIDOMFILEREADER
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper)
// nsIInterfaceRequestor
NS_DECL_NSIINTERFACEREQUESTOR

View File

@ -144,7 +144,7 @@ nsInProcessTabChildGlobal::Init()
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsInProcessTabChildGlobal,
nsDOMEventTargetHelper,
DOMEventTargetHelper,
mMessageManager,
mGlobal)
@ -158,10 +158,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal)
NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsInProcessTabChildGlobal, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsInProcessTabChildGlobal, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsInProcessTabChildGlobal, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsInProcessTabChildGlobal, DOMEventTargetHelper)
NS_IMETHODIMP
nsInProcessTabChildGlobal::GetContent(nsIDOMWindow** aContent)
@ -217,7 +217,7 @@ nsInProcessTabChildGlobal::DelayedDisconnect()
mOwner = nullptr;
// Fire the "unload" event
nsDOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("unload"));
DOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("unload"));
// Continue with the Disconnect cleanup
nsCOMPtr<nsPIDOMWindow> win = do_GetInterface(mDocShell);

View File

@ -8,10 +8,10 @@
#define nsInProcessTabChildGlobal_h
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsCOMPtr.h"
#include "nsFrameMessageManager.h"
#include "nsIScriptContext.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIScriptContext.h"
#include "nsIClassInfo.h"
@ -27,7 +27,7 @@ namespace mozilla {
class EventChainPreVisitor;
} // namespace mozilla
class nsInProcessTabChildGlobal : public nsDOMEventTargetHelper,
class nsInProcessTabChildGlobal : public mozilla::DOMEventTargetHelper,
public nsFrameScriptExecutor,
public nsIInProcessContentFrameMessageManager,
public nsIGlobalObject,
@ -41,7 +41,7 @@ public:
virtual ~nsInProcessTabChildGlobal();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsInProcessTabChildGlobal,
nsDOMEventTargetHelper)
mozilla::DOMEventTargetHelper)
NS_FORWARD_SAFE_NSIMESSAGELISTENERMANAGER(mMessageManager)
NS_FORWARD_SAFE_NSIMESSAGESENDER(mMessageManager)
NS_IMETHOD SendSyncMessage(const nsAString& aMessageName,
@ -107,20 +107,21 @@ public:
bool aUseCapture)
{
// By default add listeners only for trusted events!
return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture, false, 2);
return mozilla::DOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture, false,
2);
}
NS_IMETHOD AddEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
bool aUseCapture, bool aWantsUntrusted,
uint8_t optional_argc) MOZ_OVERRIDE
{
return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture,
aWantsUntrusted,
optional_argc);
return mozilla::DOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture,
aWantsUntrusted,
optional_argc);
}
using nsDOMEventTargetHelper::AddEventListener;
using mozilla::DOMEventTargetHelper::AddEventListener;
virtual JSContext* GetJSContextForEventHandlers() MOZ_OVERRIDE { return nsContentUtils::GetSafeJSContext(); }
virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE { return mPrincipal; }

View File

@ -234,24 +234,24 @@ XMLHttpRequestAuthPrompt::PromptPassword(const char16_t* aDialogTitle,
NS_IMPL_CYCLE_COLLECTION_CLASS(nsXHREventTarget)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXHREventTarget,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsXHREventTarget,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsXHREventTarget)
NS_INTERFACE_MAP_ENTRY(nsIXMLHttpRequestEventTarget)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsXHREventTarget, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsXHREventTarget, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsXHREventTarget, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsXHREventTarget, DOMEventTargetHelper)
void
nsXHREventTarget::DisconnectFromOwner()
{
nsDOMEventTargetHelper::DisconnectFromOwner();
DOMEventTargetHelper::DisconnectFromOwner();
}
/////////////////////////////////////////////
@ -450,7 +450,7 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsXMLHttpRequest)
return tmp->
IsBlackAndDoesNotNeedTracing(static_cast<nsDOMEventTargetHelper*>(tmp));
IsBlackAndDoesNotNeedTracing(static_cast<DOMEventTargetHelper*>(tmp));
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsXMLHttpRequest)
@ -1410,7 +1410,7 @@ nsXMLHttpRequest::CreateReadystatechangeEvent(nsIDOMEvent** aDOMEvent)
}
void
nsXMLHttpRequest::DispatchProgressEvent(nsDOMEventTargetHelper* aTarget,
nsXMLHttpRequest::DispatchProgressEvent(DOMEventTargetHelper* aTarget,
const nsAString& aType,
bool aLengthComputable,
uint64_t aLoaded, uint64_t aTotal)
@ -2020,7 +2020,7 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
// principal.
const nsAString& emptyStr = EmptyString();
nsCOMPtr<nsIDOMDocument> responseDoc;
nsIGlobalObject* global = nsDOMEventTargetHelper::GetParentObject();
nsIGlobalObject* global = DOMEventTargetHelper::GetParentObject();
rv = NS_NewDOMDocument(getter_AddRefs(responseDoc),
emptyStr, emptyStr, nullptr, docURI,
baseURI, mPrincipal, true, global,

View File

@ -25,12 +25,12 @@
#include "nsJSUtils.h"
#include "nsTArray.h"
#include "nsITimer.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIPrincipal.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsISizeOfEventTarget.h"
#include "mozilla/Assertions.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/XMLHttpRequestBinding.h"
@ -96,12 +96,12 @@ protected:
} // namespace mozilla
class nsXHREventTarget : public nsDOMEventTargetHelper,
class nsXHREventTarget : public mozilla::DOMEventTargetHelper,
public nsIXMLHttpRequestEventTarget
{
protected:
nsXHREventTarget(nsDOMEventTargetHelper* aOwner)
: nsDOMEventTargetHelper(aOwner)
nsXHREventTarget(mozilla::DOMEventTargetHelper* aOwner)
: mozilla::DOMEventTargetHelper(aOwner)
{
}
@ -118,9 +118,9 @@ public:
virtual ~nsXHREventTarget() {}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsXHREventTarget,
nsDOMEventTargetHelper)
mozilla::DOMEventTargetHelper)
NS_DECL_NSIXMLHTTPREQUESTEVENTTARGET
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper)
IMPL_EVENT_HANDLER(loadstart)
IMPL_EVENT_HANDLER(progress)
@ -137,7 +137,7 @@ class nsXMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget,
public nsIXMLHttpRequestUpload
{
public:
nsXMLHttpRequestUpload(nsDOMEventTargetHelper* aOwner)
nsXMLHttpRequestUpload(mozilla::DOMEventTargetHelper* aOwner)
: nsXHREventTarget(aOwner)
{
}
@ -505,7 +505,7 @@ public:
// This creates a trusted readystatechange event, which is not cancelable and
// doesn't bubble.
nsresult CreateReadystatechangeEvent(nsIDOMEvent** aDOMEvent);
void DispatchProgressEvent(nsDOMEventTargetHelper* aTarget,
void DispatchProgressEvent(mozilla::DOMEventTargetHelper* aTarget,
const nsAString& aType,
bool aLengthComputable,
uint64_t aLoaded, uint64_t aTotal);

View File

@ -7,7 +7,7 @@
#include "MediaRecorder.h"
#include "GeneratedEvents.h"
#include "MediaEncoder.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsError.h"
#include "nsIDocument.h"
#include "nsIDOMRecordErrorEvent.h"
@ -33,14 +33,14 @@ namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaRecorder, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaRecorder, DOMEventTargetHelper,
mStream)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaRecorder)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MediaRecorder, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MediaRecorder, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MediaRecorder, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MediaRecorder, DOMEventTargetHelper)
/**
* Session is an object to represent a single recording event.
@ -478,7 +478,7 @@ MediaRecorder::~MediaRecorder()
}
MediaRecorder::MediaRecorder(DOMMediaStream& aStream, nsPIDOMWindow* aOwnerWindow)
: nsDOMEventTargetHelper(aOwnerWindow),
: DOMEventTargetHelper(aOwnerWindow),
mState(RecordingState::Inactive),
mMutex("Session.Data.Mutex")
{

View File

@ -8,7 +8,7 @@
#define MediaRecorder_h
#include "mozilla/dom/MediaRecorderBinding.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
// Max size for allowing queue encoded data in memory
#define MAX_ALLOW_MEMORY_BUFFER 1024000
@ -35,7 +35,7 @@ namespace dom {
* Also extract the encoded data and create blobs on every timeslice passed from start function or RequestData function called by UA.
*/
class MediaRecorder : public nsDOMEventTargetHelper
class MediaRecorder : public DOMEventTargetHelper
{
class Session;
friend class CreateAndDispatchBlobEventRunnable;
@ -52,7 +52,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaRecorder,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
// WebIDL
// Start recording. If timeSlice has been provided, mediaRecorder will

View File

@ -31,13 +31,13 @@ MediaStreamTrack::~MediaStreamTrack()
{
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaStreamTrack, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaStreamTrack, DOMEventTargetHelper,
mStream)
NS_IMPL_ADDREF_INHERITED(MediaStreamTrack, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MediaStreamTrack, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MediaStreamTrack, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MediaStreamTrack, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaStreamTrack)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
void
MediaStreamTrack::GetId(nsAString& aID)

View File

@ -6,7 +6,7 @@
#ifndef MEDIASTREAMTRACK_H_
#define MEDIASTREAMTRACK_H_
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsID.h"
#include "StreamBuffer.h"
@ -22,7 +22,7 @@ class VideoStreamTrack;
/**
* Class representing a track in a DOMMediaStream.
*/
class MediaStreamTrack : public nsDOMEventTargetHelper {
class MediaStreamTrack : public DOMEventTargetHelper {
public:
/**
* aTrackID is the MediaStreamGraph track ID for the track in the
@ -32,7 +32,8 @@ public:
virtual ~MediaStreamTrack();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamTrack, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamTrack,
DOMEventTargetHelper)
DOMMediaStream* GetParentObject() const { return mStream; }
virtual JSObject* WrapObject(JSContext* aCx,

View File

@ -17,17 +17,17 @@ namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrack,
nsDOMEventTargetHelper,
DOMEventTargetHelper,
mParent,
mCueList,
mActiveCueList,
mTextTrackList,
mTrackElement)
NS_IMPL_ADDREF_INHERITED(TextTrack, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TextTrack, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(TextTrack, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TextTrack, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrack)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
TextTrack::TextTrack(nsISupports* aParent,
TextTrackKind aKind,

View File

@ -7,10 +7,10 @@
#ifndef mozilla_dom_TextTrack_h
#define mozilla_dom_TextTrack_h
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/TextTrackBinding.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsString.h"
namespace mozilla {
@ -36,11 +36,11 @@ enum TextTrackReadyState {
FailedToLoad = 3U
};
class TextTrack MOZ_FINAL : public nsDOMEventTargetHelper
class TextTrack MOZ_FINAL : public DOMEventTargetHelper
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrack, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrack, DOMEventTargetHelper)
TextTrack(nsISupports* aParent,
TextTrackKind aKind,

View File

@ -13,17 +13,17 @@ namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrackCue,
nsDOMEventTargetHelper,
DOMEventTargetHelper,
mDocument,
mTrack,
mTrackElement,
mDisplayState,
mRegion)
NS_IMPL_ADDREF_INHERITED(TextTrackCue, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TextTrackCue, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(TextTrackCue, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TextTrackCue, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrackCue)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
StaticRefPtr<nsIWebVTTParserWrapper> TextTrackCue::sParserWrapper;

View File

@ -7,10 +7,10 @@
#ifndef mozilla_dom_TextTrackCue_h
#define mozilla_dom_TextTrackCue_h
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/DocumentFragment.h"
#include "mozilla/dom/VTTCueBinding.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIWebVTTParserWrapper.h"
#include "mozilla/StaticPtr.h"
#include "nsIDocument.h"
@ -24,11 +24,11 @@ class HTMLTrackElement;
class TextTrack;
class TextTrackRegion;
class TextTrackCue MOZ_FINAL : public nsDOMEventTargetHelper
class TextTrackCue MOZ_FINAL : public DOMEventTargetHelper
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackCue, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackCue, DOMEventTargetHelper)
// TextTrackCue WebIDL
// See bug 868509 about splitting out the WebVTT-specific interfaces.

View File

@ -14,15 +14,15 @@ namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED_3(TextTrackList,
nsDOMEventTargetHelper,
DOMEventTargetHelper,
mGlobal,
mTextTracks,
mTextTrackManager)
NS_IMPL_ADDREF_INHERITED(TextTrackList, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TextTrackList, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(TextTrackList, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TextTrackList, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrackList)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
TextTrackList::TextTrackList(nsISupports* aGlobal) : mGlobal(aGlobal)
{

View File

@ -7,9 +7,9 @@
#ifndef mozilla_dom_TextTrackList_h
#define mozilla_dom_TextTrackList_h
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/TextTrack.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
namespace mozilla {
namespace dom {
@ -20,11 +20,11 @@ class CompareTextTracks;
class TrackEvent;
class TrackEventRunner;
class TextTrackList MOZ_FINAL : public nsDOMEventTargetHelper
class TextTrackList MOZ_FINAL : public DOMEventTargetHelper
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, DOMEventTargetHelper)
TextTrackList(nsISupports* aGlobal);
TextTrackList(nsISupports* aGlobal, TextTrackManager* aTextTrackManager);

View File

@ -271,7 +271,7 @@ MediaSource::Detach()
}
MediaSource::MediaSource(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mDuration(UnspecifiedNaN<double>())
, mDecoder(nullptr)
, mReadyState(MediaSourceReadyState::Closed)
@ -370,15 +370,15 @@ MediaSource::NotifyEvicted(double aStart, double aEnd)
mSourceBuffers->Evict(aStart, aEnd);
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(MediaSource, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(MediaSource, DOMEventTargetHelper,
mSourceBuffers, mActiveSourceBuffers)
NS_IMPL_ADDREF_INHERITED(MediaSource, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MediaSource, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MediaSource, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MediaSource, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaSource)
NS_INTERFACE_MAP_ENTRY(mozilla::dom::MediaSource)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
} // namespace dom

View File

@ -11,12 +11,12 @@
#include "js/RootingAPI.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/MediaSourceBinding.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionNoteChild.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsID.h"
#include "nsISupports.h"
#include "nscore.h"
@ -41,7 +41,7 @@ template <typename T> class Optional;
{ 0x3839d699, 0x22c5, 0x439f, \
{ 0x94, 0xca, 0x0e, 0x0b, 0x26, 0xf9, 0xca, 0xbf } }
class MediaSource MOZ_FINAL : public nsDOMEventTargetHelper
class MediaSource MOZ_FINAL : public DOMEventTargetHelper
{
public:
/** WebIDL Methods. */
@ -64,7 +64,7 @@ public:
/** End WebIDL Methods. */
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaSource, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaSource, DOMEventTargetHelper)
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID)
nsPIDOMWindow* GetParentObject() const;

View File

@ -253,7 +253,7 @@ SourceBuffer::Ended()
}
SourceBuffer::SourceBuffer(MediaSource* aMediaSource, const nsACString& aType)
: nsDOMEventTargetHelper(aMediaSource->GetParentObject())
: DOMEventTargetHelper(aMediaSource->GetParentObject())
, mMediaSource(aMediaSource)
, mAppendWindowStart(0)
, mAppendWindowEnd(PositiveInfinity<double>())
@ -399,13 +399,14 @@ SourceBuffer::Evict(double aStart, double aEnd)
}
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SourceBuffer, nsDOMEventTargetHelper, mMediaSource)
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SourceBuffer, DOMEventTargetHelper,
mMediaSource)
NS_IMPL_ADDREF_INHERITED(SourceBuffer, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SourceBuffer, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SourceBuffer, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SourceBuffer, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SourceBuffer)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
} // namespace dom

View File

@ -14,12 +14,12 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/SourceBufferBinding.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/mozalloc.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionNoteChild.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsISupports.h"
#include "nsStringGlue.h"
#include "nscore.h"
@ -38,7 +38,7 @@ namespace dom {
class TimeRanges;
class SourceBuffer MOZ_FINAL : public nsDOMEventTargetHelper
class SourceBuffer MOZ_FINAL : public DOMEventTargetHelper
{
public:
/** WebIDL Methods. */
@ -86,7 +86,7 @@ public:
/** End WebIDL Methods. */
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBuffer, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBuffer, DOMEventTargetHelper)
explicit SourceBuffer(MediaSource* aMediaSource, const nsACString& aType);
~SourceBuffer();

View File

@ -135,7 +135,7 @@ SourceBufferList::QueueAsyncSimpleEvent(const char* aName)
}
SourceBufferList::SourceBufferList(MediaSource* aMediaSource)
: nsDOMEventTargetHelper(aMediaSource->GetParentObject())
: DOMEventTargetHelper(aMediaSource->GetParentObject())
, mMediaSource(aMediaSource)
{
MOZ_ASSERT(aMediaSource);
@ -153,14 +153,14 @@ SourceBufferList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
return SourceBufferListBinding::Wrap(aCx, aScope, this);
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SourceBufferList, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SourceBufferList, DOMEventTargetHelper,
mMediaSource, mSourceBuffers)
NS_IMPL_ADDREF_INHERITED(SourceBufferList, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SourceBufferList, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SourceBufferList, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SourceBufferList, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SourceBufferList)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
} // namespace dom

View File

@ -11,10 +11,10 @@
#include "js/RootingAPI.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsAutoPtr.h"
#include "nsCycleCollectionNoteChild.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsISupports.h"
#include "nsTArray.h"
@ -30,7 +30,7 @@ namespace dom {
class MediaSource;
class SourceBufferList MOZ_FINAL : public nsDOMEventTargetHelper
class SourceBufferList MOZ_FINAL : public DOMEventTargetHelper
{
public:
/** WebIDL Methods. */
@ -40,7 +40,8 @@ public:
/** End WebIDL methods. */
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBufferList, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBufferList,
DOMEventTargetHelper)
explicit SourceBufferList(MediaSource* aMediaSource);

View File

@ -47,9 +47,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AudioContext)
if (!tmp->mIsStarted) {
NS_IMPL_CYCLE_COLLECTION_UNLINK(mActiveNodes)
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioContext, nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioContext,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDestination)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListener)
if (!tmp->mIsStarted) {
@ -59,10 +60,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioContext, nsDOMEventTarget
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_ADDREF_INHERITED(AudioContext, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(AudioContext, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(AudioContext, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(AudioContext, DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioContext)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
static float GetSampleRateForAudioContext(bool aIsOffline, float aSampleRate)
{
@ -79,7 +80,7 @@ AudioContext::AudioContext(nsPIDOMWindow* aWindow,
uint32_t aNumberOfChannels,
uint32_t aLength,
float aSampleRate)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mSampleRate(GetSampleRateForAudioContext(aIsOffline, aSampleRate))
, mNumberOfChannels(aNumberOfChannels)
, mNodeCount(0)

View File

@ -10,16 +10,16 @@
#include "mozilla/dom/AudioChannelBinding.h"
#include "MediaBufferDecoder.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/TypedArray.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsHashKeys.h"
#include "nsTHashtable.h"
#include "js/TypeDecls.h"
#include "nsIMemoryReporter.h"
#include "mozilla/MemoryReporting.h"
// X11 has a #define for CurrentTime. Unbelievable :-(.
// See content/media/DOMMediaStream.h for more fun!
@ -62,7 +62,7 @@ class ScriptProcessorNode;
class WaveShaperNode;
class PeriodicWave;
class AudioContext MOZ_FINAL : public nsDOMEventTargetHelper,
class AudioContext MOZ_FINAL : public DOMEventTargetHelper,
public nsIMemoryReporter
{
AudioContext(nsPIDOMWindow* aParentWindow,
@ -75,7 +75,7 @@ class AudioContext MOZ_FINAL : public nsDOMEventTargetHelper,
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioContext,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
nsPIDOMWindow* GetParentObject() const
@ -90,7 +90,7 @@ public:
virtual JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
using nsDOMEventTargetHelper::DispatchTrustedEvent;
using DOMEventTargetHelper::DispatchTrustedEvent;
// Constructor for regular AudioContext
static already_AddRefed<AudioContext>

View File

@ -17,20 +17,21 @@ static const uint32_t INVALID_PORT = 0xffffffff;
NS_IMPL_CYCLE_COLLECTION_CLASS(AudioNode)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AudioNode, nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AudioNode, DOMEventTargetHelper)
tmp->DisconnectFromGraph();
tmp->mContext->UpdateNodeCount(-1);
NS_IMPL_CYCLE_COLLECTION_UNLINK(mContext)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputNodes)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputParams)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioNode, nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioNode,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mContext)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOutputNodes)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOutputParams)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_ADDREF_INHERITED(AudioNode, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(AudioNode, DOMEventTargetHelper)
NS_IMETHODIMP_(MozExternalRefCountType)
AudioNode::Release()
@ -40,26 +41,26 @@ AudioNode::Release()
// the derived type is destroyed.
DisconnectFromGraph();
}
nsrefcnt r = nsDOMEventTargetHelper::Release();
nsrefcnt r = DOMEventTargetHelper::Release();
NS_LOG_RELEASE(this, r, "AudioNode");
return r;
}
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioNode)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
AudioNode::AudioNode(AudioContext* aContext,
uint32_t aChannelCount,
ChannelCountMode aChannelCountMode,
ChannelInterpretation aChannelInterpretation)
: nsDOMEventTargetHelper(aContext->GetParentObject())
: DOMEventTargetHelper(aContext->GetParentObject())
, mContext(aContext)
, mChannelCount(aChannelCount)
, mChannelCountMode(aChannelCountMode)
, mChannelInterpretation(aChannelInterpretation)
{
MOZ_ASSERT(aContext);
nsDOMEventTargetHelper::BindToOwner(aContext->GetParentObject());
DOMEventTargetHelper::BindToOwner(aContext->GetParentObject());
SetIsDOMBinding();
aContext->UpdateNodeCount(1);
}

View File

@ -7,7 +7,7 @@
#ifndef AudioNode_h_
#define AudioNode_h_
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/AudioNodeBinding.h"
#include "nsCycleCollectionParticipant.h"
#include "nsAutoPtr.h"
@ -81,7 +81,7 @@ private:
* still alive, and will still be alive when it receives a message from the
* engine.
*/
class AudioNode : public nsDOMEventTargetHelper
class AudioNode : public DOMEventTargetHelper
{
protected:
// You can only use refcounting to delete this object
@ -98,7 +98,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioNode,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
virtual AudioBufferSourceNode* AsAudioBufferSourceNode() {
return nullptr;

View File

@ -88,7 +88,7 @@ public:
return mNumberOfOutputChannels;
}
using nsDOMEventTargetHelper::DispatchTrustedEvent;
using DOMEventTargetHelper::DispatchTrustedEvent;
private:
nsAutoPtr<SharedBuffers> mSharedBuffers;

View File

@ -60,15 +60,15 @@ GetSpeechRecognitionLog()
NS_INTERFACE_MAP_BEGIN(SpeechRecognition)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SpeechRecognition, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SpeechRecognition, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SpeechRecognition, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SpeechRecognition, DOMEventTargetHelper)
struct SpeechRecognition::TestConfig SpeechRecognition::mTestConfig;
SpeechRecognition::SpeechRecognition(nsPIDOMWindow* aOwnerWindow)
: nsDOMEventTargetHelper(aOwnerWindow)
: DOMEventTargetHelper(aOwnerWindow)
, mEndpointer(kSAMPLE_RATE)
, mAudioSamplesPerChunk(mEndpointer.FrameSize())
, mSpeechDetectionTimer(do_CreateInstance(NS_TIMER_CONTRACTID))

View File

@ -8,8 +8,8 @@
#define mozilla_dom_SpeechRecognition_h
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsCOMPtr.h"
#include "nsDOMEventTargetHelper.h"
#include "nsString.h"
#include "nsWrapperCache.h"
#include "nsTArray.h"
@ -53,7 +53,7 @@ PRLogModuleInfo* GetSpeechRecognitionLog();
#define SR_LOG(...)
#endif
class SpeechRecognition MOZ_FINAL : public nsDOMEventTargetHelper,
class SpeechRecognition MOZ_FINAL : public DOMEventTargetHelper,
public nsIObserver,
public SupportsWeakPtr<SpeechRecognition>
{
@ -293,7 +293,7 @@ private:
inline nsISupports*
ToSupports(dom::SpeechRecognition* aRec)
{
return ToSupports(static_cast<nsDOMEventTargetHelper*>(aRec));
return ToSupports(static_cast<DOMEventTargetHelper*>(aRec));
}
} // namespace mozilla

View File

@ -43,7 +43,7 @@ SpeechRecognitionAlternative::WrapObject(JSContext* aCx,
nsISupports*
SpeechRecognitionAlternative::GetParentObject() const
{
return static_cast<nsDOMEventTargetHelper*>(mParent.get());
return static_cast<DOMEventTargetHelper*>(mParent.get());
}
void

View File

@ -40,7 +40,7 @@ SpeechRecognitionResult::WrapObject(JSContext* aCx,
nsISupports*
SpeechRecognitionResult::GetParentObject() const
{
return static_cast<nsDOMEventTargetHelper*>(mParent.get());
return static_cast<DOMEventTargetHelper*>(mParent.get());
}
already_AddRefed<SpeechRecognitionAlternative>

View File

@ -34,7 +34,7 @@ SpeechRecognitionResultList::~SpeechRecognitionResultList()
nsISupports*
SpeechRecognitionResultList::GetParentObject() const
{
return static_cast<nsDOMEventTargetHelper*>(mParent.get());
return static_cast<DOMEventTargetHelper*>(mParent.get());
}
JSObject*

View File

@ -25,7 +25,7 @@ SpeechStreamListener::~SpeechStreamListener()
SpeechRecognition* forgottenRecognition = nullptr;
mRecognition.swap(forgottenRecognition);
NS_ProxyRelease(mainThread,
static_cast<nsDOMEventTargetHelper*>(forgottenRecognition));
static_cast<DOMEventTargetHelper*>(forgottenRecognition));
}
void

View File

@ -19,18 +19,18 @@ namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SpeechSynthesisUtterance,
nsDOMEventTargetHelper, mVoice);
DOMEventTargetHelper, mVoice);
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SpeechSynthesisUtterance)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SpeechSynthesisUtterance, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SpeechSynthesisUtterance, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SpeechSynthesisUtterance, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SpeechSynthesisUtterance, DOMEventTargetHelper)
SpeechSynthesisUtterance::SpeechSynthesisUtterance(nsPIDOMWindow* aOwnerWindow,
const nsAString& text)
: nsDOMEventTargetHelper(aOwnerWindow)
: DOMEventTargetHelper(aOwnerWindow)
, mText(text)
, mVolume(1)
, mRate(1)

View File

@ -7,8 +7,8 @@
#ifndef mozilla_dom_SpeechSynthesisUtterance_h
#define mozilla_dom_SpeechSynthesisUtterance_h
#include "mozilla/DOMEventTargetHelper.h"
#include "nsCOMPtr.h"
#include "nsDOMEventTargetHelper.h"
#include "nsString.h"
#include "js/TypeDecls.h"
@ -21,7 +21,7 @@ class SpeechSynthesisVoice;
class SpeechSynthesis;
class nsSynthVoiceRegistry;
class SpeechSynthesisUtterance MOZ_FINAL : public nsDOMEventTargetHelper
class SpeechSynthesisUtterance MOZ_FINAL : public DOMEventTargetHelper
{
friend class SpeechSynthesis;
friend class nsSpeechTask;
@ -33,8 +33,8 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SpeechSynthesisUtterance,
nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
nsISupports* GetParentObject() const;

View File

@ -18,8 +18,8 @@ using mozilla::dom::DOMCursor;
using mozilla::AutoSafeJSContext;
DOMRequest::DOMRequest(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow->IsInnerWindow() ?
aWindow : aWindow->GetCurrentInnerWindow())
: DOMEventTargetHelper(aWindow->IsInnerWindow() ?
aWindow : aWindow->GetCurrentInnerWindow())
, mResult(JSVAL_VOID)
, mDone(false)
{
@ -28,29 +28,29 @@ DOMRequest::DOMRequest(nsPIDOMWindow* aWindow)
NS_IMPL_CYCLE_COLLECTION_CLASS(DOMRequest)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(DOMRequest,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mError)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DOMRequest,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mError)
tmp->mResult = JSVAL_VOID;
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(DOMRequest,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
// Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because
// nsDOMEventTargetHelper does it for us.
// DOMEventTargetHelper does it for us.
NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mResult)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMRequest)
NS_INTERFACE_MAP_ENTRY(nsIDOMDOMRequest)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(DOMRequest, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(DOMRequest, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(DOMRequest, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(DOMRequest, DOMEventTargetHelper)
/* virtual */ JSObject*
DOMRequest::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)

View File

@ -8,8 +8,8 @@
#define mozilla_dom_domrequest_h__
#include "nsIDOMDOMRequest.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/DOMRequestBinding.h"
#include "nsCOMPtr.h"
@ -17,7 +17,7 @@
namespace mozilla {
namespace dom {
class DOMRequest : public nsDOMEventTargetHelper,
class DOMRequest : public DOMEventTargetHelper,
public nsIDOMDOMRequest
{
protected:
@ -28,10 +28,10 @@ protected:
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMDOMREQUEST
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(DOMRequest,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
// WrapperCache
nsPIDOMWindow* GetParentObject() const

View File

@ -269,9 +269,9 @@ PostMessageRunnable::Run()
}
MessagePortBase::MessagePortBase(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
{
// SetIsDOMBinding() is called by nsDOMEventTargetHelper's ctor.
// SetIsDOMBinding() is called by DOMEventTargetHelper's ctor.
}
MessagePortBase::MessagePortBase()
@ -282,7 +282,7 @@ MessagePortBase::MessagePortBase()
NS_IMPL_CYCLE_COLLECTION_CLASS(MessagePort)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MessagePort,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mEntangledPort)
// Custom unlink loop because this array contains nsRunnable objects
@ -300,7 +300,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MessagePort,
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MessagePort,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEntangledPort)
// Custom unlink loop because this array contains nsRunnable objects
@ -317,10 +317,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MessagePort,
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MessagePort)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MessagePort, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MessagePort, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MessagePort, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MessagePort, DOMEventTargetHelper)
MessagePort::MessagePort(nsPIDOMWindow* aWindow)
: MessagePortBase(aWindow)

View File

@ -7,7 +7,7 @@
#define mozilla_dom_MessagePort_h
#include "mozilla/Attributes.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
class nsPIDOMWindow;
@ -17,7 +17,7 @@ namespace dom {
class DispatchEventRunnable;
class PostMessageRunnable;
class MessagePortBase : public nsDOMEventTargetHelper
class MessagePortBase : public DOMEventTargetHelper
{
protected:
MessagePortBase(nsPIDOMWindow* aWindow);
@ -59,7 +59,7 @@ class MessagePort MOZ_FINAL : public MessagePortBase
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MessagePort,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
MessagePort(nsPIDOMWindow* aWindow);
~MessagePort();

View File

@ -23,6 +23,7 @@
#include "xpcprivate.h"
#include "XPCWrapper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/RegisterBindings.h"
#include "nscore.h"
@ -37,7 +38,6 @@
#include "nsIXPCSecurityManager.h"
#include "xptcall.h"
#include "nsTArray.h"
#include "nsDOMEventTargetHelper.h"
#include "nsDocument.h" // nsDOMStyleSheetList
#include "nsDOMBlobBuilder.h"
@ -3521,8 +3521,7 @@ nsEventTargetSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
JSObject *aGlobalObj, JSObject **parentObj)
{
JS::Rooted<JSObject*> globalObj(cx, aGlobalObj);
nsDOMEventTargetHelper *target =
nsDOMEventTargetHelper::FromSupports(nativeObj);
DOMEventTargetHelper* target = DOMEventTargetHelper::FromSupports(nativeObj);
nsCOMPtr<nsIScriptGlobalObject> native_parent;
target->GetParentObject(getter_AddRefs(native_parent));
@ -3544,8 +3543,7 @@ nsEventTargetSH::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
void
nsEventTargetSH::PreserveWrapper(nsISupports *aNative)
{
nsDOMEventTargetHelper *target =
nsDOMEventTargetHelper::FromSupports(aNative);
DOMEventTargetHelper* target = DOMEventTargetHelper::FromSupports(aNative);
target->PreserveWrapper(aNative);
}

View File

@ -204,7 +204,7 @@
#include "nsLocation.h"
#include "nsHTMLDocument.h"
#include "nsWrapperCacheInlines.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "prrng.h"
#include "nsSandboxFlags.h"
#include "TimeChangeObserver.h"
@ -1225,10 +1225,10 @@ nsGlobalWindow::Init()
}
static PLDHashOperator
DisconnectEventTargetObjects(nsPtrHashKey<nsDOMEventTargetHelper>* aKey,
DisconnectEventTargetObjects(nsPtrHashKey<DOMEventTargetHelper>* aKey,
void* aClosure)
{
nsRefPtr<nsDOMEventTargetHelper> target = aKey->GetKey();
nsRefPtr<DOMEventTargetHelper> target = aKey->GetKey();
target->DisconnectFromOwner();
return PL_DHASH_NEXT;
}
@ -1336,13 +1336,13 @@ nsGlobalWindow::~nsGlobalWindow()
}
void
nsGlobalWindow::AddEventTargetObject(nsDOMEventTargetHelper* aObject)
nsGlobalWindow::AddEventTargetObject(DOMEventTargetHelper* aObject)
{
mEventTargetObjects.PutEntry(aObject);
}
void
nsGlobalWindow::RemoveEventTargetObject(nsDOMEventTargetHelper* aObject)
nsGlobalWindow::RemoveEventTargetObject(DOMEventTargetHelper* aObject)
{
mEventTargetObjects.RemoveEntry(aObject);
}
@ -12856,12 +12856,12 @@ nsGlobalWindow::DisableTimeChangeNotifications()
static PLDHashOperator
CollectSizeAndListenerCount(
nsPtrHashKey<nsDOMEventTargetHelper> *aEntry,
nsPtrHashKey<DOMEventTargetHelper>* aEntry,
void *arg)
{
nsWindowSizes* windowSizes = static_cast<nsWindowSizes*>(arg);
nsDOMEventTargetHelper* et = aEntry->GetKey();
DOMEventTargetHelper* et = aEntry->GetKey();
if (nsCOMPtr<nsISizeOfEventTarget> iSizeOf = do_QueryObject(et)) {
windowSizes->mDOMEventTargetsSize +=
@ -12904,7 +12904,7 @@ nsGlobalWindow::AddSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const
mEventTargetObjects.SizeOfExcludingThis(nullptr,
aWindowSizes->mMallocSizeOf);
aWindowSizes->mDOMEventTargetsCount +=
const_cast<nsTHashtable<nsPtrHashKey<nsDOMEventTargetHelper> >*>
const_cast<nsTHashtable<nsPtrHashKey<DOMEventTargetHelper> >*>
(&mEventTargetObjects)->EnumerateEntries(CollectSizeAndListenerCount,
aWindowSizes);
}

View File

@ -94,7 +94,6 @@ class nsScreen;
class nsHistory;
class nsGlobalWindowObserver;
class nsGlobalWindow;
class nsDOMEventTargetHelper;
class nsDOMWindowUtils;
class nsIIdleService;
struct nsIntSize;
@ -103,6 +102,7 @@ struct nsRect;
class nsWindowSizes;
namespace mozilla {
class DOMEventTargetHelper;
class Selection;
namespace dom {
class BarProp;
@ -684,8 +684,8 @@ public:
void UnmarkGrayTimers();
void AddEventTargetObject(nsDOMEventTargetHelper* aObject);
void RemoveEventTargetObject(nsDOMEventTargetHelper* aObject);
void AddEventTargetObject(mozilla::DOMEventTargetHelper* aObject);
void RemoveEventTargetObject(mozilla::DOMEventTargetHelper* aObject);
void NotifyIdleObserver(IdleObserverHolder* aIdleObserverHolder,
bool aCallOnidle);
@ -1546,7 +1546,7 @@ protected:
// currently enabled on this window.
bool mAreDialogsEnabled;
nsTHashtable<nsPtrHashKey<nsDOMEventTargetHelper> > mEventTargetObjects;
nsTHashtable<nsPtrHashKey<mozilla::DOMEventTargetHelper> > mEventTargetObjects;
nsTArray<uint32_t> mEnabledSensors;

View File

@ -44,7 +44,7 @@ nsScreen::Create(nsPIDOMWindow* aWindow)
}
nsScreen::nsScreen(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mEventListener(nullptr)
{
}
@ -59,10 +59,10 @@ nsScreen::~nsScreen()
// QueryInterface implementation for nsScreen
NS_INTERFACE_MAP_BEGIN(nsScreen)
NS_INTERFACE_MAP_ENTRY(nsIDOMScreen)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsScreen, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsScreen, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsScreen, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsScreen, DOMEventTargetHelper)
int32_t
nsScreen::GetPixelDepth(ErrorResult& aRv)

View File

@ -7,17 +7,17 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/ScreenOrientation.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/HalScreenConfiguration.h"
#include "nsIDOMScreen.h"
#include "nsCOMPtr.h"
#include "nsDOMEventTargetHelper.h"
#include "nsRect.h"
class nsDeviceContext;
// Script "screen" object
class nsScreen : public nsDOMEventTargetHelper
class nsScreen : public mozilla::DOMEventTargetHelper
, public nsIDOMScreen
, public mozilla::hal::ScreenConfigurationObserver
{
@ -27,7 +27,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSCREEN
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper)
nsPIDOMWindow* GetParentObject() const
{

View File

@ -4,13 +4,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <limits>
#include "mozilla/Hal.h"
#include "BatteryManager.h"
#include "nsIDOMClassInfo.h"
#include "Constants.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/Hal.h"
#include "mozilla/Preferences.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/dom/BatteryManagerBinding.h"
#include "nsIDOMClassInfo.h"
/**
* We have to use macros here because our leak analysis tool things we are
@ -26,7 +26,7 @@ namespace dom {
namespace battery {
BatteryManager::BatteryManager(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mLevel(kDefaultLevel)
, mCharging(kDefaultCharging)
, mRemainingTime(kDefaultRemainingTime)

View File

@ -6,11 +6,10 @@
#ifndef mozilla_dom_battery_BatteryManager_h
#define mozilla_dom_battery_BatteryManager_h
#include "nsDOMEventTargetHelper.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/Observer.h"
#include "Types.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/Observer.h"
#include "nsCycleCollectionParticipant.h"
class nsPIDOMWindow;
class nsIScriptContext;
@ -24,7 +23,7 @@ class BatteryInformation;
namespace dom {
namespace battery {
class BatteryManager : public nsDOMEventTargetHelper
class BatteryManager : public DOMEventTargetHelper
, public BatteryObserver
{
public:

View File

@ -394,7 +394,7 @@ DOMInterfaces = {
# couldBeDOMBinding stuff in WrapNewBindingObject.
'hasXPConnectImpls': True,
'concrete': False,
'jsImplParent': 'nsDOMEventTargetHelper'
'jsImplParent': 'mozilla::DOMEventTargetHelper'
},
'Exception': {

View File

@ -32,27 +32,27 @@ USING_BLUETOOTH_NAMESPACE
NS_IMPL_CYCLE_COLLECTION_CLASS(BluetoothAdapter)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(BluetoothAdapter,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsUuids)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsDeviceAddresses)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(BluetoothAdapter,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(BluetoothAdapter,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
tmp->Unroot();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
// QueryInterface implementation for BluetoothAdapter
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothAdapter)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothAdapter, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothAdapter, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothAdapter, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothAdapter, DOMEventTargetHelper)
class GetDevicesTask : public BluetoothReplyRunnable
{
@ -160,7 +160,7 @@ static int kCreatePairedDeviceTimeout = 50000; // unit: msec
BluetoothAdapter::BluetoothAdapter(nsPIDOMWindow* aWindow,
const BluetoothValue& aValue)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, BluetoothPropertyContainer(BluetoothObjectType::TYPE_ADAPTER)
, mJsUuids(nullptr)
, mJsDeviceAddresses(nullptr)

View File

@ -8,10 +8,10 @@
#define mozilla_dom_bluetooth_bluetoothadapter_h__
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "BluetoothCommon.h"
#include "BluetoothPropertyContainer.h"
#include "nsCOMPtr.h"
#include "nsDOMEventTargetHelper.h"
namespace mozilla {
namespace dom {
@ -28,7 +28,7 @@ class BluetoothSignal;
class BluetoothNamedValue;
class BluetoothValue;
class BluetoothAdapter : public nsDOMEventTargetHelper
class BluetoothAdapter : public DOMEventTargetHelper
, public BluetoothSignalObserver
, public BluetoothPropertyContainer
{
@ -36,7 +36,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(BluetoothAdapter,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
static already_AddRefed<BluetoothAdapter>
Create(nsPIDOMWindow* aOwner, const BluetoothValue& aValue);

View File

@ -23,31 +23,31 @@ DOMCI_DATA(BluetoothDevice, BluetoothDevice)
NS_IMPL_CYCLE_COLLECTION_CLASS(BluetoothDevice)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(BluetoothDevice,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsUuids)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsServices)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(BluetoothDevice,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(BluetoothDevice,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
tmp->Unroot();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothDevice)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothDevice, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothDevice, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothDevice, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothDevice, DOMEventTargetHelper)
BluetoothDevice::BluetoothDevice(nsPIDOMWindow* aWindow,
const nsAString& aAdapterPath,
const BluetoothValue& aValue)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, BluetoothPropertyContainer(BluetoothObjectType::TYPE_DEVICE)
, mJsUuids(nullptr)
, mJsServices(nullptr)

View File

@ -8,9 +8,9 @@
#define mozilla_dom_bluetooth_bluetoothdevice_h__
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "BluetoothCommon.h"
#include "BluetoothPropertyContainer.h"
#include "nsDOMEventTargetHelper.h"
#include "nsString.h"
BEGIN_BLUETOOTH_NAMESPACE
@ -20,7 +20,7 @@ class BluetoothValue;
class BluetoothSignal;
class BluetoothSocket;
class BluetoothDevice : public nsDOMEventTargetHelper
class BluetoothDevice : public DOMEventTargetHelper
, public BluetoothSignalObserver
, public BluetoothPropertyContainer
{
@ -28,7 +28,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(BluetoothDevice,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
static already_AddRefed<BluetoothDevice>
Create(nsPIDOMWindow* aOwner, const nsAString& aAdapterPath,

View File

@ -25,10 +25,10 @@ USING_BLUETOOTH_NAMESPACE
// QueryInterface implementation for BluetoothManager
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothManager)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothManager, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothManager, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothManager, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothManager, DOMEventTargetHelper)
class GetAdapterTask : public BluetoothReplyRunnable
{
@ -90,7 +90,7 @@ private:
};
BluetoothManager::BluetoothManager(nsPIDOMWindow *aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, BluetoothPropertyContainer(BluetoothObjectType::TYPE_MANAGER)
{
MOZ_ASSERT(aWindow);

View File

@ -8,10 +8,10 @@
#define mozilla_dom_bluetooth_bluetoothmanager_h__
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/Observer.h"
#include "BluetoothCommon.h"
#include "BluetoothPropertyContainer.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/Observer.h"
#include "nsISupportsImpl.h"
namespace mozilla {
@ -24,7 +24,7 @@ BEGIN_BLUETOOTH_NAMESPACE
class BluetoothNamedValue;
class BluetoothManager : public nsDOMEventTargetHelper
class BluetoothManager : public DOMEventTargetHelper
, public BluetoothSignalObserver
, public BluetoothPropertyContainer
{

View File

@ -66,7 +66,7 @@ CellBroadcast::Create(nsPIDOMWindow* aWindow, ErrorResult& aRv)
CellBroadcast::CellBroadcast(nsPIDOMWindow *aWindow,
nsICellBroadcastProvider *aProvider)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mProvider(aProvider)
{
mListener = new Listener(this);

View File

@ -7,8 +7,8 @@
#define mozilla_dom_CellBroadcast_h__
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/ErrorResult.h"
#include "nsDOMEventTargetHelper.h"
#include "nsICellBroadcastProvider.h"
#include "js/TypeDecls.h"
@ -17,7 +17,7 @@ class nsPIDOMWindow;
namespace mozilla {
namespace dom {
class CellBroadcast MOZ_FINAL : public nsDOMEventTargetHelper
class CellBroadcast MOZ_FINAL : public DOMEventTargetHelper
{
/**
* Class CellBroadcast doesn't actually inherit nsICellBroadcastListener.
@ -31,7 +31,7 @@ class CellBroadcast MOZ_FINAL : public nsDOMEventTargetHelper
public:
NS_DECL_NSICELLBROADCASTLISTENER
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
static already_AddRefed<CellBroadcast>
Create(nsPIDOMWindow* aOwner, ErrorResult& aRv);

View File

@ -11,7 +11,7 @@
#include "nsIFile.h"
#include "nsIPrincipal.h"
#include "nsIObserver.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/RefPtr.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/DOMRequest.h"
@ -151,7 +151,7 @@ class FileUpdateDispatcher MOZ_FINAL
};
class nsDOMDeviceStorage MOZ_FINAL
: public nsDOMEventTargetHelper
: public mozilla::DOMEventTargetHelper
, public nsIDOMDeviceStorage
, public nsIObserver
{

View File

@ -3091,13 +3091,13 @@ NS_IMPL_CYCLE_COLLECTION_4(DeviceStorageRequest,
NS_INTERFACE_MAP_BEGIN(nsDOMDeviceStorage)
NS_INTERFACE_MAP_ENTRY(nsIDOMDeviceStorage)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsDOMDeviceStorage, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMDeviceStorage, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsDOMDeviceStorage, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMDeviceStorage, DOMEventTargetHelper)
nsDOMDeviceStorage::nsDOMDeviceStorage(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mIsWatchingFile(false)
, mAllowedToWatchFile(false)
{
@ -4168,8 +4168,8 @@ nsDOMDeviceStorage::AddEventListener(const nsAString & aType,
return rv;
}
return nsDOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture,
aWantsUntrusted, aArgc);
return DOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture,
aWantsUntrusted, aArgc);
}
void
@ -4197,8 +4197,8 @@ nsDOMDeviceStorage::AddEventListener(const nsAString & aType,
if (NS_WARN_IF(NS_FAILED(rv))) {
return;
}
nsDOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture,
aWantsUntrusted, aRv);
DOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture,
aWantsUntrusted, aRv);
}
NS_IMETHODIMP
@ -4223,7 +4223,7 @@ nsDOMDeviceStorage::RemoveEventListener(const nsAString & aType,
nsIDOMEventListener *aListener,
bool aUseCapture)
{
nsDOMEventTargetHelper::RemoveEventListener(aType, aListener, false);
DOMEventTargetHelper::RemoveEventListener(aType, aListener, false);
if (mIsWatchingFile && !HasListenersFor(nsGkAtoms::onchange)) {
mIsWatchingFile = false;
@ -4239,7 +4239,7 @@ nsDOMDeviceStorage::RemoveEventListener(const nsAString& aType,
bool aCapture,
ErrorResult& aRv)
{
nsDOMEventTargetHelper::RemoveEventListener(aType, aListener, aCapture, aRv);
DOMEventTargetHelper::RemoveEventListener(aType, aListener, aCapture, aRv);
if (mIsWatchingFile && !HasListenersFor(nsGkAtoms::onchange)) {
mIsWatchingFile = false;
@ -4260,37 +4260,37 @@ NS_IMETHODIMP
nsDOMDeviceStorage::DispatchEvent(nsIDOMEvent *aEvt,
bool *aRetval)
{
return nsDOMEventTargetHelper::DispatchEvent(aEvt, aRetval);
return DOMEventTargetHelper::DispatchEvent(aEvt, aRetval);
}
EventTarget*
nsDOMDeviceStorage::GetTargetForDOMEvent()
{
return nsDOMEventTargetHelper::GetTargetForDOMEvent();
return DOMEventTargetHelper::GetTargetForDOMEvent();
}
EventTarget *
nsDOMDeviceStorage::GetTargetForEventTargetChain()
{
return nsDOMEventTargetHelper::GetTargetForEventTargetChain();
return DOMEventTargetHelper::GetTargetForEventTargetChain();
}
nsresult
nsDOMDeviceStorage::PreHandleEvent(EventChainPreVisitor& aVisitor)
{
return nsDOMEventTargetHelper::PreHandleEvent(aVisitor);
return DOMEventTargetHelper::PreHandleEvent(aVisitor);
}
nsresult
nsDOMDeviceStorage::WillHandleEvent(EventChainPostVisitor& aVisitor)
{
return nsDOMEventTargetHelper::WillHandleEvent(aVisitor);
return DOMEventTargetHelper::WillHandleEvent(aVisitor);
}
nsresult
nsDOMDeviceStorage::PostHandleEvent(EventChainPostVisitor& aVisitor)
{
return nsDOMEventTargetHelper::PostHandleEvent(aVisitor);
return DOMEventTargetHelper::PostHandleEvent(aVisitor);
}
nsresult
@ -4299,34 +4299,34 @@ nsDOMDeviceStorage::DispatchDOMEvent(WidgetEvent* aEvent,
nsPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
return nsDOMEventTargetHelper::DispatchDOMEvent(aEvent,
aDOMEvent,
aPresContext,
aEventStatus);
return DOMEventTargetHelper::DispatchDOMEvent(aEvent,
aDOMEvent,
aPresContext,
aEventStatus);
}
EventListenerManager*
nsDOMDeviceStorage::GetOrCreateListenerManager()
{
return nsDOMEventTargetHelper::GetOrCreateListenerManager();
return DOMEventTargetHelper::GetOrCreateListenerManager();
}
EventListenerManager*
nsDOMDeviceStorage::GetExistingListenerManager() const
{
return nsDOMEventTargetHelper::GetExistingListenerManager();
return DOMEventTargetHelper::GetExistingListenerManager();
}
nsIScriptContext *
nsDOMDeviceStorage::GetContextForEventHandlers(nsresult *aRv)
{
return nsDOMEventTargetHelper::GetContextForEventHandlers(aRv);
return DOMEventTargetHelper::GetContextForEventHandlers(aRv);
}
JSContext *
nsDOMDeviceStorage::GetJSContextForEventHandlers()
{
return nsDOMEventTargetHelper::GetJSContextForEventHandlers();
return DOMEventTargetHelper::GetJSContextForEventHandlers();
}
NS_IMPL_EVENT_HANDLER(nsDOMDeviceStorage, change)

View File

@ -3,49 +3,50 @@
* 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 "nsDOMEventTargetHelper.h"
#include "nsContentUtils.h"
#include "nsIDocument.h"
#include "prprf.h"
#include "nsGlobalWindow.h"
#include "ScriptSettings.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/Likely.h"
using namespace mozilla;
using namespace mozilla::dom;
namespace mozilla {
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMEventTargetHelper)
using namespace dom;
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_CLASS(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(DOMEventTargetHelper)
if (MOZ_UNLIKELY(cb.WantDebugInfo())) {
char name[512];
nsAutoString uri;
if (tmp->mOwnerWindow && tmp->mOwnerWindow->GetExtantDoc()) {
tmp->mOwnerWindow->GetExtantDoc()->GetDocumentURI(uri);
}
PR_snprintf(name, sizeof(name), "nsDOMEventTargetHelper %s",
PR_snprintf(name, sizeof(name), "DOMEventTargetHelper %s",
NS_ConvertUTF16toUTF8(uri).get());
cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name);
} else {
NS_IMPL_CYCLE_COLLECTION_DESCRIBE(nsDOMEventTargetHelper, tmp->mRefCnt.get())
NS_IMPL_CYCLE_COLLECTION_DESCRIBE(DOMEventTargetHelper, tmp->mRefCnt.get())
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListenerManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_UNLINK(mListenerManager)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(DOMEventTargetHelper)
if (tmp->IsBlack()) {
if (tmp->mListenerManager) {
tmp->mListenerManager->MarkForCC();
@ -54,29 +55,29 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDOMEventTargetHelper)
}
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(DOMEventTargetHelper)
return tmp->IsBlackAndDoesNotNeedTracing(tmp);
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(DOMEventTargetHelper)
return tmp->IsBlack();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMEventTargetHelper)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget)
NS_INTERFACE_MAP_ENTRY(mozilla::dom::EventTarget)
NS_INTERFACE_MAP_ENTRY(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_ENTRY(dom::EventTarget)
NS_INTERFACE_MAP_ENTRY(DOMEventTargetHelper)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(DOMEventTargetHelper,
LastRelease())
NS_IMPL_DOMTARGET_DEFAULTS(nsDOMEventTargetHelper)
NS_IMPL_DOMTARGET_DEFAULTS(DOMEventTargetHelper)
nsDOMEventTargetHelper::~nsDOMEventTargetHelper()
DOMEventTargetHelper::~DOMEventTargetHelper()
{
if (nsPIDOMWindow* owner = GetOwner()) {
static_cast<nsGlobalWindow*>(owner)->RemoveEventTargetObject(this);
@ -88,7 +89,7 @@ nsDOMEventTargetHelper::~nsDOMEventTargetHelper()
}
void
nsDOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner)
DOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner)
{
MOZ_ASSERT(!aOwner || aOwner->IsInnerWindow());
nsCOMPtr<nsIGlobalObject> glob = do_QueryInterface(aOwner);
@ -96,7 +97,7 @@ nsDOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner)
}
void
nsDOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner)
DOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner)
{
if (mParentObject) {
if (mOwnerWindow) {
@ -118,7 +119,7 @@ nsDOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner)
}
void
nsDOMEventTargetHelper::BindToOwner(nsDOMEventTargetHelper* aOther)
DOMEventTargetHelper::BindToOwner(DOMEventTargetHelper* aOther)
{
if (mOwnerWindow) {
static_cast<nsGlobalWindow*>(mOwnerWindow)->RemoveEventTargetObject(this);
@ -141,7 +142,7 @@ nsDOMEventTargetHelper::BindToOwner(nsDOMEventTargetHelper* aOther)
}
void
nsDOMEventTargetHelper::DisconnectFromOwner()
DOMEventTargetHelper::DisconnectFromOwner()
{
mOwnerWindow = nullptr;
mParentObject = nullptr;
@ -153,9 +154,9 @@ nsDOMEventTargetHelper::DisconnectFromOwner()
}
NS_IMETHODIMP
nsDOMEventTargetHelper::RemoveEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
bool aUseCapture)
DOMEventTargetHelper::RemoveEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
bool aUseCapture)
{
EventListenerManager* elm = GetExistingListenerManager();
if (elm) {
@ -165,14 +166,14 @@ nsDOMEventTargetHelper::RemoveEventListener(const nsAString& aType,
return NS_OK;
}
NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(nsDOMEventTargetHelper)
NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(DOMEventTargetHelper)
NS_IMETHODIMP
nsDOMEventTargetHelper::AddEventListener(const nsAString& aType,
nsIDOMEventListener *aListener,
bool aUseCapture,
bool aWantsUntrusted,
uint8_t aOptionalArgc)
DOMEventTargetHelper::AddEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
bool aUseCapture,
bool aWantsUntrusted,
uint8_t aOptionalArgc)
{
NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1,
"Won't check if this is chrome, you want to set "
@ -191,11 +192,11 @@ nsDOMEventTargetHelper::AddEventListener(const nsAString& aType,
}
void
nsDOMEventTargetHelper::AddEventListener(const nsAString& aType,
EventListener* aListener,
bool aUseCapture,
const Nullable<bool>& aWantsUntrusted,
ErrorResult& aRv)
DOMEventTargetHelper::AddEventListener(const nsAString& aType,
EventListener* aListener,
bool aUseCapture,
const Nullable<bool>& aWantsUntrusted,
ErrorResult& aRv)
{
bool wantsUntrusted;
if (aWantsUntrusted.IsNull()) {
@ -217,11 +218,11 @@ nsDOMEventTargetHelper::AddEventListener(const nsAString& aType,
}
NS_IMETHODIMP
nsDOMEventTargetHelper::AddSystemEventListener(const nsAString& aType,
nsIDOMEventListener *aListener,
bool aUseCapture,
bool aWantsUntrusted,
uint8_t aOptionalArgc)
DOMEventTargetHelper::AddSystemEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
bool aUseCapture,
bool aWantsUntrusted,
uint8_t aOptionalArgc)
{
NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1,
"Won't check if this is chrome, you want to set "
@ -238,7 +239,7 @@ nsDOMEventTargetHelper::AddSystemEventListener(const nsAString& aType,
}
NS_IMETHODIMP
nsDOMEventTargetHelper::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal)
DOMEventTargetHelper::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal)
{
nsEventStatus status = nsEventStatus_eIgnore;
nsresult rv =
@ -249,7 +250,7 @@ nsDOMEventTargetHelper::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal)
}
nsresult
nsDOMEventTargetHelper::DispatchTrustedEvent(const nsAString& aEventName)
DOMEventTargetHelper::DispatchTrustedEvent(const nsAString& aEventName)
{
nsCOMPtr<nsIDOMEvent> event;
NS_NewDOMEvent(getter_AddRefs(event), this, nullptr, nullptr);
@ -260,7 +261,7 @@ nsDOMEventTargetHelper::DispatchTrustedEvent(const nsAString& aEventName)
}
nsresult
nsDOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event)
DOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event)
{
event->SetTrusted(true);
@ -269,24 +270,24 @@ nsDOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event)
}
nsresult
nsDOMEventTargetHelper::SetEventHandler(nsIAtom* aType,
JSContext* aCx,
const JS::Value& aValue)
DOMEventTargetHelper::SetEventHandler(nsIAtom* aType,
JSContext* aCx,
const JS::Value& aValue)
{
nsRefPtr<EventHandlerNonNull> handler;
JS::Rooted<JSObject*> callable(aCx);
if (aValue.isObject() &&
JS_ObjectIsCallable(aCx, callable = &aValue.toObject())) {
handler = new EventHandlerNonNull(callable, mozilla::dom::GetIncumbentGlobal());
handler = new EventHandlerNonNull(callable, dom::GetIncumbentGlobal());
}
SetEventHandler(aType, EmptyString(), handler);
return NS_OK;
}
void
nsDOMEventTargetHelper::GetEventHandler(nsIAtom* aType,
JSContext* aCx,
JS::Value* aValue)
DOMEventTargetHelper::GetEventHandler(nsIAtom* aType,
JSContext* aCx,
JS::Value* aValue)
{
EventHandlerNonNull* handler = GetEventHandler(aType, EmptyString());
if (handler) {
@ -297,7 +298,7 @@ nsDOMEventTargetHelper::GetEventHandler(nsIAtom* aType,
}
nsresult
nsDOMEventTargetHelper::PreHandleEvent(EventChainPreVisitor& aVisitor)
DOMEventTargetHelper::PreHandleEvent(EventChainPreVisitor& aVisitor)
{
aVisitor.mCanHandle = true;
aVisitor.mParentTarget = nullptr;
@ -305,23 +306,23 @@ nsDOMEventTargetHelper::PreHandleEvent(EventChainPreVisitor& aVisitor)
}
nsresult
nsDOMEventTargetHelper::PostHandleEvent(EventChainPostVisitor& aVisitor)
DOMEventTargetHelper::PostHandleEvent(EventChainPostVisitor& aVisitor)
{
return NS_OK;
}
nsresult
nsDOMEventTargetHelper::DispatchDOMEvent(WidgetEvent* aEvent,
nsIDOMEvent* aDOMEvent,
nsPresContext* aPresContext,
nsEventStatus* aEventStatus)
DOMEventTargetHelper::DispatchDOMEvent(WidgetEvent* aEvent,
nsIDOMEvent* aDOMEvent,
nsPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
return EventDispatcher::DispatchDOMEvent(this, aEvent, aDOMEvent,
aPresContext, aEventStatus);
}
EventListenerManager*
nsDOMEventTargetHelper::GetOrCreateListenerManager()
DOMEventTargetHelper::GetOrCreateListenerManager()
{
if (!mListenerManager) {
mListenerManager = new EventListenerManager(this);
@ -331,13 +332,13 @@ nsDOMEventTargetHelper::GetOrCreateListenerManager()
}
EventListenerManager*
nsDOMEventTargetHelper::GetExistingListenerManager() const
DOMEventTargetHelper::GetExistingListenerManager() const
{
return mListenerManager;
}
nsIScriptContext*
nsDOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv)
DOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv)
{
*aRv = CheckInnerWindowCorrectness();
if (NS_FAILED(*aRv)) {
@ -349,7 +350,7 @@ nsDOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv)
}
nsresult
nsDOMEventTargetHelper::WantsUntrusted(bool* aRetVal)
DOMEventTargetHelper::WantsUntrusted(bool* aRetVal)
{
nsresult rv;
nsIScriptContext* context = GetContextForEventHandlers(&rv);
@ -362,15 +363,17 @@ nsDOMEventTargetHelper::WantsUntrusted(bool* aRetVal)
}
void
nsDOMEventTargetHelper::EventListenerAdded(nsIAtom* aType)
DOMEventTargetHelper::EventListenerAdded(nsIAtom* aType)
{
mozilla::ErrorResult rv;
ErrorResult rv;
EventListenerWasAdded(Substring(nsDependentAtomString(aType), 2), rv);
}
void
nsDOMEventTargetHelper::EventListenerRemoved(nsIAtom* aType)
DOMEventTargetHelper::EventListenerRemoved(nsIAtom* aType)
{
mozilla::ErrorResult rv;
ErrorResult rv;
EventListenerWasRemoved(Substring(nsDependentAtomString(aType), 2), rv);
}
} // namespace mozilla

View File

@ -3,8 +3,8 @@
* 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 nsDOMEventTargetHelper_h_
#define nsDOMEventTargetHelper_h_
#ifndef mozilla_DOMEventTargetHelper_h_
#define mozilla_DOMEventTargetHelper_h_
#include "nsCOMPtr.h"
#include "nsGkAtoms.h"
@ -18,23 +18,25 @@
#include "mozilla/dom/EventTarget.h"
class JSCompartment;
namespace mozilla {
class ErrorResult;
}
#define NS_DOMEVENTTARGETHELPER_IID \
{ 0xa28385c6, 0x9451, 0x4d7e, \
{ 0xa3, 0xdd, 0xf4, 0xb6, 0x87, 0x2f, 0xa4, 0x76 } }
class nsDOMEventTargetHelper : public mozilla::dom::EventTarget
class DOMEventTargetHelper : public dom::EventTarget
{
public:
nsDOMEventTargetHelper()
DOMEventTargetHelper()
: mParentObject(nullptr)
, mOwnerWindow(nullptr)
, mHasOrHasHadOwnerWindow(false)
{}
nsDOMEventTargetHelper(nsPIDOMWindow* aWindow)
{
}
DOMEventTargetHelper(nsPIDOMWindow* aWindow)
: mParentObject(nullptr)
, mOwnerWindow(nullptr)
, mHasOrHasHadOwnerWindow(false)
@ -43,7 +45,7 @@ public:
// All objects coming through here are WebIDL objects
SetIsDOMBinding();
}
nsDOMEventTargetHelper(nsDOMEventTargetHelper* aOther)
DOMEventTargetHelper(DOMEventTargetHelper* aOther)
: mParentObject(nullptr)
, mOwnerWindow(nullptr)
, mHasOrHasHadOwnerWindow(false)
@ -53,23 +55,21 @@ public:
SetIsDOMBinding();
}
virtual ~nsDOMEventTargetHelper();
virtual ~DOMEventTargetHelper();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(DOMEventTargetHelper)
NS_DECL_NSIDOMEVENTTARGET
virtual mozilla::EventListenerManager*
GetExistingListenerManager() const MOZ_OVERRIDE;
virtual mozilla::EventListenerManager*
GetOrCreateListenerManager() MOZ_OVERRIDE;
virtual EventListenerManager* GetExistingListenerManager() const MOZ_OVERRIDE;
virtual EventListenerManager* GetOrCreateListenerManager() MOZ_OVERRIDE;
using mozilla::dom::EventTarget::RemoveEventListener;
using dom::EventTarget::RemoveEventListener;
virtual void AddEventListener(const nsAString& aType,
mozilla::dom::EventListener* aListener,
dom::EventListener* aListener,
bool aCapture,
const mozilla::dom::Nullable<bool>& aWantsUntrusted,
mozilla::ErrorResult& aRv) MOZ_OVERRIDE;
const dom::Nullable<bool>& aWantsUntrusted,
ErrorResult& aRv) MOZ_OVERRIDE;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOMEVENTTARGETHELPER_IID)
@ -82,14 +82,12 @@ public:
}
}
static nsDOMEventTargetHelper* FromSupports(nsISupports* aSupports)
static DOMEventTargetHelper* FromSupports(nsISupports* aSupports)
{
mozilla::dom::EventTarget* target =
static_cast<mozilla::dom::EventTarget*>(aSupports);
dom::EventTarget* target = static_cast<dom::EventTarget*>(aSupports);
#ifdef DEBUG
{
nsCOMPtr<mozilla::dom::EventTarget> target_qi =
do_QueryInterface(aSupports);
nsCOMPtr<dom::EventTarget> target_qi = do_QueryInterface(aSupports);
// If this assertion fires the QI implementation for the object in
// question doesn't use the EventTarget pointer as the
@ -98,7 +96,7 @@ public:
}
#endif
return static_cast<nsDOMEventTargetHelper*>(target);
return static_cast<DOMEventTargetHelper*>(target);
}
bool HasListenersFor(nsIAtom* aTypeWithOn)
@ -109,11 +107,11 @@ public:
nsresult SetEventHandler(nsIAtom* aType,
JSContext* aCx,
const JS::Value& aValue);
using mozilla::dom::EventTarget::SetEventHandler;
using dom::EventTarget::SetEventHandler;
void GetEventHandler(nsIAtom* aType,
JSContext* aCx,
JS::Value* aValue);
using mozilla::dom::EventTarget::GetEventHandler;
using dom::EventTarget::GetEventHandler;
virtual nsIDOMWindow* GetOwnerGlobal() MOZ_OVERRIDE
{
return nsPIDOMWindow::GetOuterFromCurrentInner(GetOwner());
@ -135,7 +133,7 @@ public:
nsPIDOMWindow* GetOwner() const { return mOwnerWindow; }
void BindToOwner(nsIGlobalObject* aOwner);
void BindToOwner(nsPIDOMWindow* aOwner);
void BindToOwner(nsDOMEventTargetHelper* aOther);
void BindToOwner(DOMEventTargetHelper* aOther);
virtual void DisconnectFromOwner();
nsIGlobalObject* GetParentObject() const { return mParentObject; }
bool HasOrHasHadOwner() { return mHasOrHasHadOwnerWindow; }
@ -143,15 +141,15 @@ public:
virtual void EventListenerAdded(nsIAtom* aType) MOZ_OVERRIDE;
virtual void EventListenerRemoved(nsIAtom* aType) MOZ_OVERRIDE;
virtual void EventListenerWasAdded(const nsAString& aType,
mozilla::ErrorResult& aRv,
ErrorResult& aRv,
JSCompartment* aCompartment = nullptr) {}
virtual void EventListenerWasRemoved(const nsAString& aType,
mozilla::ErrorResult& aRv,
ErrorResult& aRv,
JSCompartment* aCompartment = nullptr) {}
protected:
nsresult WantsUntrusted(bool* aRetVal);
nsRefPtr<mozilla::EventListenerManager> mListenerManager;
nsRefPtr<EventListenerManager> mListenerManager;
// Dispatch a trusted, non-cancellable and non-bubbling event to |this|.
nsresult DispatchTrustedEvent(const nsAString& aEventName);
// Make |event| trusted and dispatch |aEvent| to |this|.
@ -167,9 +165,11 @@ private:
bool mHasOrHasHadOwnerWindow;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsDOMEventTargetHelper,
NS_DEFINE_STATIC_IID_ACCESSOR(DOMEventTargetHelper,
NS_DOMEVENTTARGETHELPER_IID)
} // namespace mozilla
// XPIDL event handlers
#define NS_IMPL_EVENT_HANDLER(_class, _event) \
NS_IMETHODIMP _class::GetOn##_event(JSContext* aCx, \
@ -278,4 +278,4 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsDOMEventTargetHelper,
return _class::GetExistingListenerManager(); \
}
#endif // nsDOMEventTargetHelper_h_
#endif // mozilla_DOMEventTargetHelper_h_

View File

@ -8,6 +8,7 @@
#include "ipc/IPCMessageUtils.h"
#include "mozilla/dom/Event.h"
#include "mozilla/ContentEvents.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/InternalMutationEvent.h"
#include "mozilla/MiscEvents.h"
@ -18,7 +19,6 @@
#include "nsContentUtils.h"
#include "nsCOMPtr.h"
#include "nsDeviceContext.h"
#include "nsDOMEventTargetHelper.h"
#include "nsError.h"
#include "nsGlobalWindow.h"
#include "nsIFrame.h"
@ -1056,7 +1056,7 @@ Event::SetOwner(mozilla::dom::EventTarget* aOwner)
return;
}
nsCOMPtr<nsDOMEventTargetHelper> eth = do_QueryInterface(aOwner);
nsCOMPtr<DOMEventTargetHelper> eth = do_QueryInterface(aOwner);
if (eth) {
mOwner = eth->GetOwner();
return;

View File

@ -14,7 +14,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'content_events'
EXPORTS += [
'nsDOMEventTargetHelper.h',
'nsDOMKeyNameList.h',
'nsEventNameList.h',
'nsEventStates.h',
@ -24,6 +23,7 @@ EXPORTS += [
EXPORTS.mozilla += [
'AsyncEventDispatcher.h',
'DOMEventTargetHelper.h',
'EventDispatcher.h',
'EventListenerManager.h',
'EventStateManager.h',
@ -76,6 +76,7 @@ UNIFIED_SOURCES += [
'DataContainerEvent.cpp',
'DataTransfer.cpp',
'DeviceMotionEvent.cpp',
'DOMEventTargetHelper.cpp',
'DragEvent.cpp',
'Event.cpp',
'EventDispatcher.cpp',
@ -92,7 +93,6 @@ UNIFIED_SOURCES += [
'MutationEvent.cpp',
'NotifyAudioAvailableEvent.cpp',
'NotifyPaintEvent.cpp',
'nsDOMEventTargetHelper.cpp',
'nsJSEventListener.cpp',
'nsPaintRequest.cpp',
'PointerEvent.cpp',

View File

@ -7,10 +7,10 @@
#ifndef mozilla_dom_file_filecommon_h__
#define mozilla_dom_file_filecommon_h__
#include "mozilla/DOMEventTargetHelper.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsDebug.h"
#include "nsString.h"
#include "nsTArray.h"

View File

@ -55,14 +55,14 @@ private:
} // anonymous namespace
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(FileHandle, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(FileHandle, DOMEventTargetHelper,
mFileStorage)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FileHandle)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(FileHandle, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(FileHandle, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(FileHandle, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(FileHandle, DOMEventTargetHelper)
// static
already_AddRefed<FileHandle>

View File

@ -12,9 +12,8 @@
#include "nsIFile.h"
#include "nsIFileStorage.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/FileModeBinding.h"
class nsIDOMFile;
@ -44,7 +43,7 @@ class FileHelper;
* GetFileInfo, CreateStream and CreateFileObject.
* (for example IDBFileHandle provides IndexedDB specific implementation).
*/
class FileHandle : public nsDOMEventTargetHelper
class FileHandle : public DOMEventTargetHelper
{
friend class FileService;
friend class LockedFile;
@ -53,7 +52,7 @@ class FileHandle : public nsDOMEventTargetHelper
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileHandle, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileHandle, DOMEventTargetHelper)
static already_AddRefed<FileHandle>
Create(nsPIDOMWindow* aWindow,
@ -124,12 +123,12 @@ public:
protected:
FileHandle(nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
{
}
FileHandle(nsDOMEventTargetHelper* aOwner)
: nsDOMEventTargetHelper(aOwner)
FileHandle(DOMEventTargetHelper* aOwner)
: DOMEventTargetHelper(aOwner)
{
}

View File

@ -310,15 +310,15 @@ LockedFile::~LockedFile()
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(LockedFile, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(LockedFile, DOMEventTargetHelper,
mFileHandle)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(LockedFile)
NS_INTERFACE_MAP_ENTRY(nsIRunnable)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(LockedFile, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(LockedFile, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(LockedFile, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(LockedFile, DOMEventTargetHelper)
nsresult
LockedFile::PreHandleEvent(EventChainPreVisitor& aVisitor)

View File

@ -9,9 +9,9 @@
#include "FileCommon.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/FileModeBinding.h"
#include "mozilla/dom/TypedArray.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIInputStream.h"
#include "nsIRunnable.h"
@ -32,7 +32,7 @@ class FileHandle;
class FileRequest;
class MetadataHelper;
class LockedFile : public nsDOMEventTargetHelper,
class LockedFile : public DOMEventTargetHelper,
public nsIRunnable
{
friend class FinishHelper;
@ -44,7 +44,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIRUNNABLE
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(LockedFile, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(LockedFile, DOMEventTargetHelper)
enum RequestMode
{

View File

@ -405,10 +405,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FMRadio)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY(nsIAudioChannelAgentCallback)
NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(FMRadio, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(FMRadio, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(FMRadio, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(FMRadio, DOMEventTargetHelper)
END_FMRADIO_NAMESPACE

View File

@ -6,12 +6,12 @@
#ifndef mozilla_dom_FMRadio_h
#define mozilla_dom_FMRadio_h
#include "FMRadioCommon.h"
#include "nsDOMEventTargetHelper.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/HalTypes.h"
#include "nsWeakReference.h"
#include "AudioChannelAgent.h"
#include "FMRadioCommon.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/HalTypes.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWeakReference.h"
class nsPIDOMWindow;
class nsIScriptContext;
@ -20,7 +20,7 @@ BEGIN_FMRADIO_NAMESPACE
class DOMRequest;
class FMRadio MOZ_FINAL : public nsDOMEventTargetHelper
class FMRadio MOZ_FINAL : public DOMEventTargetHelper
, public hal::SwitchObserver
, public FMRadioEventObserver
, public nsSupportsWeakReference
@ -36,7 +36,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
void Init(nsPIDOMWindow *aWindow);
void Shutdown();

View File

@ -5,16 +5,16 @@
#ifndef mozilla_dom_Icc_h
#define mozilla_dom_Icc_h
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "nsIIccProvider.h"
namespace mozilla {
namespace dom {
class Icc MOZ_FINAL : public nsDOMEventTargetHelper
class Icc MOZ_FINAL : public DOMEventTargetHelper
{
public:
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
Icc(nsPIDOMWindow* aWindow, long aClientId, const nsAString& aIccId);

View File

@ -20,7 +20,7 @@ DOMCI_DATA(MozIccManager, IccManager)
NS_IMPL_CYCLE_COLLECTION_CLASS(IccManager)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IccManager,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsIccIds)
// We did not setup 'mIccListeners' being a participant of cycle collection is
// because in Navigator->Invalidate() it will call mIccManager->Shutdown(),
@ -29,21 +29,21 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IccManager,
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IccManager,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IccManager,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
tmp->Unroot();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IccManager)
NS_INTERFACE_MAP_ENTRY(nsIDOMMozIccManager)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozIccManager)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(IccManager, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(IccManager, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(IccManager, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(IccManager, DOMEventTargetHelper)
IccManager::IccManager(nsPIDOMWindow* aWindow)
: mJsIccIds(nullptr)

View File

@ -5,8 +5,8 @@
#ifndef mozilla_dom_IccManager_h
#define mozilla_dom_IccManager_h
#include "mozilla/DOMEventTargetHelper.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIDOMIccManager.h"
#include "nsIIccProvider.h"
#include "nsTArrayHelpers.h"
@ -16,17 +16,17 @@ namespace dom {
class IccListener;
class IccManager MOZ_FINAL : public nsDOMEventTargetHelper
class IccManager MOZ_FINAL : public DOMEventTargetHelper
, public nsIDOMMozIccManager
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMMOZICCMANAGER
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(IccManager,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
IccManager(nsPIDOMWindow* aWindow);
~IccManager();

View File

@ -14,10 +14,10 @@
#include "nsIOfflineStorage.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/IDBObjectStoreBinding.h"
#include "mozilla/dom/IDBTransactionBinding.h"
#include "mozilla/dom/quota/PersistenceType.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/dom/indexedDB/FileManager.h"
#include "mozilla/dom/indexedDB/IDBRequest.h"

View File

@ -356,7 +356,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(IDBRequest)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBRequest, IDBWrapperCache)
// Don't need NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS because
// nsDOMEventTargetHelper does it for us.
// DOMEventTargetHelper does it for us.
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSourceAsObjectStore)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSourceAsIndex)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSourceAsCursor)
@ -375,7 +375,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IDBRequest, IDBWrapperCache)
// Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because
// nsDOMEventTargetHelper does it for us.
// DOMEventTargetHelper does it for us.
NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mResultVal)
NS_IMPL_CYCLE_COLLECTION_TRACE_END

View File

@ -12,13 +12,13 @@ USING_INDEXEDDB_NAMESPACE
NS_IMPL_CYCLE_COLLECTION_CLASS(IDBWrapperCache)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBWrapperCache,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
// Don't need NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS because
// nsDOMEventTargetHelper does it for us.
// DOMEventTargetHelper does it for us.
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IDBWrapperCache,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
if (tmp->mScriptOwner) {
tmp->mScriptOwner = nullptr;
mozilla::DropJSObjects(tmp);
@ -26,17 +26,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IDBWrapperCache,
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IDBWrapperCache,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
// Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because
// nsDOMEventTargetHelper does it for us.
// DOMEventTargetHelper does it for us.
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mScriptOwner)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IDBWrapperCache)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(IDBWrapperCache, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(IDBWrapperCache, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(IDBWrapperCache, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(IDBWrapperCache, DOMEventTargetHelper)
IDBWrapperCache::~IDBWrapperCache()
{

View File

@ -7,19 +7,18 @@
#ifndef mozilla_dom_indexeddb_idbwrappercache_h__
#define mozilla_dom_indexeddb_idbwrappercache_h__
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/indexedDB/IndexedDatabase.h"
#include "nsDOMEventTargetHelper.h"
BEGIN_INDEXEDDB_NAMESPACE
class IDBWrapperCache : public nsDOMEventTargetHelper
class IDBWrapperCache : public DOMEventTargetHelper
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
IDBWrapperCache,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
JSObject* GetScriptOwner() const
{
@ -35,7 +34,7 @@ public:
// Do what nsEventTargetSH::PreCreate does.
nsCOMPtr<nsIScriptGlobalObject> parent;
nsDOMEventTargetHelper::GetParentObject(getter_AddRefs(parent));
DOMEventTargetHelper::GetParentObject(getter_AddRefs(parent));
return parent ? parent->GetGlobalJSObject() : nullptr;
}
@ -49,11 +48,11 @@ public:
#endif
protected:
IDBWrapperCache(nsDOMEventTargetHelper* aOwner)
: nsDOMEventTargetHelper(aOwner), mScriptOwner(nullptr)
IDBWrapperCache(DOMEventTargetHelper* aOwner)
: DOMEventTargetHelper(aOwner), mScriptOwner(nullptr)
{ }
IDBWrapperCache(nsPIDOMWindow* aOwner)
: nsDOMEventTargetHelper(aOwner), mScriptOwner(nullptr)
: DOMEventTargetHelper(aOwner), mScriptOwner(nullptr)
{ }
virtual ~IDBWrapperCache();

View File

@ -2612,7 +2612,7 @@ TabChildGlobal::Init()
MM_CHILD);
}
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(TabChildGlobal, nsDOMEventTargetHelper,
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(TabChildGlobal, DOMEventTargetHelper,
mMessageManager)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TabChildGlobal)
@ -2623,10 +2623,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TabChildGlobal)
NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(TabChildGlobal, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TabChildGlobal, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(TabChildGlobal, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(TabChildGlobal, DOMEventTargetHelper)
/* [notxpcom] boolean markForCC (); */
// This method isn't automatically forwarded safely because it's notxpcom, so

View File

@ -22,7 +22,6 @@
#include "nsIInterfaceRequestorUtils.h"
#include "nsFrameMessageManager.h"
#include "nsIWebProgressListener.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIPresShell.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsWeakReference.h"
@ -30,6 +29,7 @@
#include "nsITooltipListener.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/TabContext.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventForwards.h"
#include "mozilla/layers/CompositorTypes.h"
@ -48,7 +48,7 @@ class TabChild;
class ClonedMessageData;
class TabChildBase;
class TabChildGlobal : public nsDOMEventTargetHelper,
class TabChildGlobal : public DOMEventTargetHelper,
public nsIContentFrameMessageManager,
public nsIScriptObjectPrincipal,
public nsIGlobalObject
@ -57,7 +57,7 @@ public:
TabChildGlobal(TabChildBase* aTabChild);
void Init();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, nsDOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, DOMEventTargetHelper)
NS_FORWARD_SAFE_NSIMESSAGELISTENERMANAGER(mMessageManager)
NS_FORWARD_SAFE_NSIMESSAGESENDER(mMessageManager)
NS_IMETHOD SendSyncMessage(const nsAString& aMessageName,
@ -103,19 +103,19 @@ public:
bool aUseCapture)
{
// By default add listeners only for trusted events!
return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture, false, 2);
return DOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture, false, 2);
}
using nsDOMEventTargetHelper::AddEventListener;
using DOMEventTargetHelper::AddEventListener;
NS_IMETHOD AddEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
bool aUseCapture, bool aWantsUntrusted,
uint8_t optional_argc) MOZ_OVERRIDE
{
return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture,
aWantsUntrusted,
optional_argc);
return DOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture,
aWantsUntrusted,
optional_argc);
}
nsresult

View File

@ -52,23 +52,23 @@ DOMCI_DATA(MozMobileConnection, MobileConnection)
NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnection)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MobileConnection,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
// Don't traverse mListener because it doesn't keep any reference to
// MobileConnection but a raw pointer instead. Neither does mProvider because
// it's an xpcom service and is only released at shutting down.
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MobileConnection,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MobileConnection)
NS_INTERFACE_MAP_ENTRY(nsIDOMMozMobileConnection)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozMobileConnection)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MobileConnection, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MobileConnection, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MobileConnection, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MobileConnection, DOMEventTargetHelper)
NS_IMPL_EVENT_HANDLER(MobileConnection, voicechange)
NS_IMPL_EVENT_HANDLER(MobileConnection, datachange)

View File

@ -5,16 +5,16 @@
#ifndef mozilla_dom_network_MobileConnection_h
#define mozilla_dom_network_MobileConnection_h
#include "mozilla/DOMEventTargetHelper.h"
#include "nsIDOMMobileConnection.h"
#include "nsIMobileConnectionProvider.h"
#include "nsDOMEventTargetHelper.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWeakPtr.h"
namespace mozilla {
namespace dom {
class MobileConnection : public nsDOMEventTargetHelper
class MobileConnection : public DOMEventTargetHelper
, public nsIDOMMozMobileConnection
{
/**
@ -32,7 +32,7 @@ public:
NS_DECL_NSIDOMMOZMOBILECONNECTION
NS_DECL_NSIMOBILECONNECTIONLISTENER
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
MobileConnection(uint32_t aClientId);
@ -40,7 +40,7 @@ public:
void Shutdown();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MobileConnection,
nsDOMEventTargetHelper)
DOMEventTargetHelper)
private:
nsCOMPtr<nsIMobileConnectionProvider> mProvider;

View File

@ -52,10 +52,10 @@ NS_INTERFACE_MAP_BEGIN(MobileMessageManager)
NS_INTERFACE_MAP_ENTRY(nsIDOMMozMobileMessageManager)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozMobileMessageManager)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MobileMessageManager, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MobileMessageManager, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MobileMessageManager, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MobileMessageManager, DOMEventTargetHelper)
NS_IMPL_EVENT_HANDLER(MobileMessageManager, received)
NS_IMPL_EVENT_HANDLER(MobileMessageManager, retrieving)

View File

@ -6,9 +6,9 @@
#ifndef mozilla_dom_mobilemessage_MobileMessageManager_h
#define mozilla_dom_mobilemessage_MobileMessageManager_h
#include "mozilla/DOMEventTargetHelper.h"
#include "nsIDOMMobileMessageManager.h"
#include "nsIObserver.h"
#include "nsDOMEventTargetHelper.h"
class nsIDOMMozSmsMessage;
class nsIDOMMozMmsMessage;
@ -16,7 +16,7 @@ class nsIDOMMozMmsMessage;
namespace mozilla {
namespace dom {
class MobileMessageManager : public nsDOMEventTargetHelper
class MobileMessageManager : public DOMEventTargetHelper
, public nsIDOMMozMobileMessageManager
, public nsIObserver
{
@ -25,7 +25,7 @@ public:
NS_DECL_NSIOBSERVER
NS_DECL_NSIDOMMOZMOBILEMESSAGEMANAGER
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
void Init(nsPIDOMWindow *aWindow);
void Shutdown();

View File

@ -20,13 +20,13 @@ namespace mozilla {
namespace dom {
namespace network {
NS_IMPL_QUERY_INTERFACE_INHERITED1(Connection, nsDOMEventTargetHelper,
NS_IMPL_QUERY_INTERFACE_INHERITED1(Connection, DOMEventTargetHelper,
nsINetworkProperties)
// Don't use |Connection| alone, since that confuses nsTraceRefcnt since
// we're not the only class with that name.
NS_IMPL_ADDREF_INHERITED(dom::network::Connection, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(dom::network::Connection, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(dom::network::Connection, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(dom::network::Connection, DOMEventTargetHelper)
Connection::Connection()
: mType(static_cast<ConnectionType>(kDefaultType))

View File

@ -6,12 +6,12 @@
#ifndef mozilla_dom_network_Connection_h
#define mozilla_dom_network_Connection_h
#include "nsINetworkProperties.h"
#include "nsDOMEventTargetHelper.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/Observer.h"
#include "Types.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/Observer.h"
#include "mozilla/dom/NetworkInformationBinding.h"
#include "nsCycleCollectionParticipant.h"
#include "nsINetworkProperties.h"
namespace mozilla {
@ -22,7 +22,7 @@ class NetworkInformation;
namespace dom {
namespace network {
class Connection MOZ_FINAL : public nsDOMEventTargetHelper
class Connection MOZ_FINAL : public DOMEventTargetHelper
, public NetworkObserver
, public nsINetworkProperties
{
@ -30,7 +30,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSINETWORKPROPERTIES
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
Connection();

View File

@ -12,12 +12,13 @@
#include "nsIDocShell.h"
#include "AudioChannelService.h"
using namespace mozilla::dom;
namespace mozilla {
namespace dom {
NS_IMPL_QUERY_INTERFACE_INHERITED1(SpeakerManager, nsDOMEventTargetHelper,
NS_IMPL_QUERY_INTERFACE_INHERITED1(SpeakerManager, DOMEventTargetHelper,
nsIDOMEventListener)
NS_IMPL_ADDREF_INHERITED(SpeakerManager, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SpeakerManager, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(SpeakerManager, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SpeakerManager, DOMEventTargetHelper)
SpeakerManager::SpeakerManager()
: mForcespeaker(false)
@ -219,3 +220,6 @@ SpeakerManager::SetAudioChannelActive(bool isActive)
}
}
}
} // namespace dom
} // namespace mozilla

View File

@ -5,7 +5,7 @@
#ifndef mozilla_dom_SpeakerManager_h
#define mozilla_dom_SpeakerManager_h
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/MozSpeakerManagerBinding.h"
namespace mozilla {
@ -16,7 +16,7 @@ namespace dom {
* The device's speaker status would set back to normal when UA close the application.
*/
class SpeakerManager MOZ_FINAL
: public nsDOMEventTargetHelper
: public DOMEventTargetHelper
, public nsIDOMEventListener
{
friend class SpeakerManagerService;

View File

@ -138,7 +138,7 @@ DesktopNotification::DesktopNotification(const nsAString & title,
const nsAString & iconURL,
nsPIDOMWindow *aWindow,
nsIPrincipal* principal)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mTitle(title)
, mDescription(description)
, mIconURL(iconURL)

View File

@ -16,11 +16,11 @@
#include "nsIDOMWindow.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIDOMEvent.h"
#include "nsIDocument.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/ErrorResult.h"
#include "nsWrapperCache.h"
@ -84,7 +84,7 @@ private:
class DesktopNotificationRequest;
class DesktopNotification MOZ_FINAL : public nsDOMEventTargetHelper
class DesktopNotification MOZ_FINAL : public DOMEventTargetHelper
{
friend class DesktopNotificationRequest;

View File

@ -419,7 +419,7 @@ Notification::Notification(const nsAString& aID, const nsAString& aTitle, const
NotificationDirection aDir, const nsAString& aLang,
const nsAString& aTag, const nsAString& aIconUrl,
nsPIDOMWindow* aWindow)
: nsDOMEventTargetHelper(aWindow),
: DOMEventTargetHelper(aWindow),
mID(aID), mTitle(aTitle), mBody(aBody), mDir(aDir), mLang(aLang),
mTag(aTag), mIconUrl(aIconUrl), mIsClosed(false)
{

View File

@ -5,9 +5,9 @@
#ifndef mozilla_dom_notification_h__
#define mozilla_dom_notification_h__
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/NotificationBinding.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIObserver.h"
#include "nsCycleCollectionParticipant.h"
@ -21,7 +21,7 @@ namespace dom {
class NotificationObserver;
class Promise;
class Notification : public nsDOMEventTargetHelper
class Notification : public DOMEventTargetHelper
{
friend class NotificationTask;
friend class NotificationPermissionRequest;

View File

@ -54,7 +54,7 @@ static const char kMaxEntriesPref[] = "offline.max_site_resources";
//
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsDOMOfflineResourceList,
nsDOMEventTargetHelper,
DOMEventTargetHelper,
mCacheUpdate,
mPendingEvents)
@ -63,10 +63,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMOfflineResourceList)
NS_INTERFACE_MAP_ENTRY(nsIOfflineCacheUpdateObserver)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsDOMOfflineResourceList, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMOfflineResourceList, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsDOMOfflineResourceList, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMOfflineResourceList, DOMEventTargetHelper)
NS_IMPL_EVENT_HANDLER(nsDOMOfflineResourceList, checking)
NS_IMPL_EVENT_HANDLER(nsDOMOfflineResourceList, error)
@ -80,7 +80,7 @@ NS_IMPL_EVENT_HANDLER(nsDOMOfflineResourceList, obsolete)
nsDOMOfflineResourceList::nsDOMOfflineResourceList(nsIURI *aManifestURI,
nsIURI *aDocumentURI,
nsPIDOMWindow *aWindow)
: nsDOMEventTargetHelper(aWindow)
: DOMEventTargetHelper(aWindow)
, mInitialized(false)
, mManifestURI(aManifestURI)
, mDocumentURI(aDocumentURI)

View File

@ -23,7 +23,7 @@
#include "nsIScriptContext.h"
#include "nsCycleCollectionParticipant.h"
#include "nsPIDOMWindow.h"
#include "nsDOMEventTargetHelper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/ErrorResult.h"
class nsIDOMWindow;
@ -34,7 +34,7 @@ class DOMStringList;
} // namespace dom
} // namespace mozilla
class nsDOMOfflineResourceList : public nsDOMEventTargetHelper,
class nsDOMOfflineResourceList : public mozilla::DOMEventTargetHelper,
public nsIDOMOfflineResourceList,
public nsIObserver,
public nsIOfflineCacheUpdateObserver,
@ -49,7 +49,7 @@ public:
NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMOfflineResourceList,
nsDOMEventTargetHelper)
mozilla::DOMEventTargetHelper)
nsDOMOfflineResourceList(nsIURI* aManifestURI,
nsIURI* aDocumentURI,

View File

@ -18,10 +18,10 @@ namespace mozilla {
namespace dom {
namespace system {
NS_IMPL_QUERY_INTERFACE_INHERITED1(AudioChannelManager, nsDOMEventTargetHelper,
NS_IMPL_QUERY_INTERFACE_INHERITED1(AudioChannelManager, DOMEventTargetHelper,
nsIDOMEventListener)
NS_IMPL_ADDREF_INHERITED(AudioChannelManager, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(AudioChannelManager, nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(AudioChannelManager, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(AudioChannelManager, DOMEventTargetHelper)
AudioChannelManager::AudioChannelManager()
: mState(SWITCH_STATE_UNKNOWN)

Some files were not shown because too many files have changed in this diff Show More