2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; 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 nsDOMCommandEvent_h__
|
|
|
|
#define nsDOMCommandEvent_h__
|
|
|
|
|
|
|
|
#include "nsIDOMCommandEvent.h"
|
|
|
|
#include "nsDOMEvent.h"
|
2013-03-13 14:05:32 -07:00
|
|
|
#include "mozilla/dom/CommandEventBinding.h"
|
2013-09-25 04:21:20 -07:00
|
|
|
#include "mozilla/EventForwards.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsDOMCommandEvent : public nsDOMEvent,
|
|
|
|
public nsIDOMCommandEvent
|
|
|
|
{
|
|
|
|
public:
|
2013-03-09 03:34:29 -08:00
|
|
|
nsDOMCommandEvent(mozilla::dom::EventTarget* aOwner,
|
|
|
|
nsPresContext* aPresContext,
|
2013-09-26 23:20:54 -07:00
|
|
|
mozilla::WidgetCommandEvent* aEvent);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
NS_DECL_NSIDOMCOMMANDEVENT
|
|
|
|
|
|
|
|
// Forward to base class
|
|
|
|
NS_FORWARD_TO_NSDOMEVENT
|
2013-03-13 14:05:32 -07:00
|
|
|
|
2013-04-25 09:29:54 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
2013-03-13 14:05:32 -07:00
|
|
|
{
|
|
|
|
return mozilla::dom::CommandEventBinding::Wrap(aCx, aScope, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void InitCommandEvent(const nsAString& aType,
|
|
|
|
bool aCanBubble,
|
|
|
|
bool aCancelable,
|
|
|
|
const nsAString& aCommand,
|
|
|
|
mozilla::ErrorResult& aRv)
|
|
|
|
{
|
|
|
|
aRv = InitCommandEvent(aType, aCanBubble, aCancelable, aCommand);
|
|
|
|
}
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsDOMCommandEvent_h__
|