Bug 1688354 [wpt PR 27298] - Treat 'rem' as an absolute unit for font size, a=testonly
[gecko.git] / dom / events / CommandEvent.h
blobc5c62a0173e303b278918d5572485978930d4e73
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_CommandEvent_h_
8 #define mozilla_dom_CommandEvent_h_
10 #include "mozilla/EventForwards.h"
11 #include "mozilla/dom/CommandEventBinding.h"
12 #include "mozilla/dom/Event.h"
14 namespace mozilla {
15 namespace dom {
17 class CommandEvent : public Event {
18 public:
19 CommandEvent(EventTarget* aOwner, nsPresContext* aPresContext,
20 WidgetCommandEvent* aEvent);
22 NS_INLINE_DECL_REFCOUNTING_INHERITED(CommandEvent, Event)
24 virtual JSObject* WrapObjectInternal(
25 JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override {
26 return CommandEvent_Binding::Wrap(aCx, this, aGivenProto);
29 void GetCommand(nsAString& aCommand);
31 protected:
32 ~CommandEvent() = default;
35 } // namespace dom
36 } // namespace mozilla
38 already_AddRefed<mozilla::dom::CommandEvent> NS_NewDOMCommandEvent(
39 mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext,
40 mozilla::WidgetCommandEvent* aEvent);
42 #endif // mozilla_dom_CommandEvent_h_