2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsJSEventListener_h__
|
|
|
|
#define nsJSEventListener_h__
|
|
|
|
|
2013-06-05 09:15:48 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-06-23 05:03:39 -07:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIDOMKeyEvent.h"
|
|
|
|
#include "nsIJSEventListener.h"
|
2011-08-08 11:26:26 -07:00
|
|
|
#include "nsIDOMEventListener.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIAtom.h"
|
|
|
|
#include "nsIScriptContext.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
|
|
|
|
// nsJSEventListener interface
|
|
|
|
// misnamed - JS no longer has exclusive rights over this interface!
|
2011-08-24 12:49:25 -07:00
|
|
|
class nsJSEventListener : public nsIJSEventListener
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2013-11-27 01:12:41 -08:00
|
|
|
nsJSEventListener(JSObject* aScopeObject, nsISupports* aTarget,
|
|
|
|
nsIAtom* aType, const nsEventHandler& aHandler);
|
2007-03-22 10:30:00 -07:00
|
|
|
virtual ~nsJSEventListener();
|
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
|
|
|
|
// nsIDOMEventListener interface
|
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
|
|
|
|
2011-08-24 12:49:25 -07:00
|
|
|
// nsIJSEventListener
|
2011-10-29 13:16:43 -07:00
|
|
|
|
2013-06-23 05:03:39 -07:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE
|
2011-08-26 15:39:00 -07:00
|
|
|
{
|
2012-02-01 13:58:01 -08:00
|
|
|
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
2011-08-26 15:39:00 -07:00
|
|
|
}
|
2009-10-16 01:57:32 -07:00
|
|
|
|
2012-01-26 07:03:21 -08:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsJSEventListener)
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2013-05-04 00:52:57 -07:00
|
|
|
virtual void UpdateScopeObject(JS::Handle<JSObject*> aScopeObject);
|
2012-11-09 08:00:25 -08:00
|
|
|
|
2012-01-26 07:03:21 -08:00
|
|
|
bool IsBlackForCC();
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //nsJSEventListener_h__
|
|
|
|
|