Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_CommandEvent_h_
7 #define mozilla_dom_CommandEvent_h_
9 #include "mozilla/EventForwards.h"
10 #include "mozilla/dom/CommandEventBinding.h"
11 #include "mozilla/dom/Event.h"
12 #include "nsIDOMCommandEvent.h"
14 namespace mozilla {
15 namespace dom {
17 class CommandEvent : public Event,
18 public nsIDOMCommandEvent
19 {
20 public:
21 CommandEvent(EventTarget* aOwner,
22 nsPresContext* aPresContext,
23 WidgetCommandEvent* aEvent);
25 NS_DECL_ISUPPORTS_INHERITED
27 NS_DECL_NSIDOMCOMMANDEVENT
29 // Forward to base class
30 NS_FORWARD_TO_EVENT
32 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
33 {
34 return CommandEventBinding::Wrap(aCx, this);
35 }
37 void InitCommandEvent(const nsAString& aType,
38 bool aCanBubble,
39 bool aCancelable,
40 const nsAString& aCommand,
41 ErrorResult& aRv)
42 {
43 aRv = InitCommandEvent(aType, aCanBubble, aCancelable, aCommand);
44 }
45 };
47 } // namespace dom
48 } // namespace mozilla
50 #endif // mozilla_dom_CommandEvent_h_