Bug 1025824 - Fix mHwcLayerMap handling r=sushil
[gecko.git] / dom / events / FocusEvent.h
blob2bbe774ee29abfa82a52691b11e214740304901c
1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
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/. */
5 #ifndef mozilla_dom_FocusEvent_h_
6 #define mozilla_dom_FocusEvent_h_
8 #include "mozilla/dom/FocusEventBinding.h"
9 #include "mozilla/dom/UIEvent.h"
10 #include "mozilla/EventForwards.h"
11 #include "nsIDOMFocusEvent.h"
13 namespace mozilla {
14 namespace dom {
16 class FocusEvent : public UIEvent,
17 public nsIDOMFocusEvent
19 public:
20 NS_DECL_ISUPPORTS
21 NS_DECL_NSIDOMFOCUSEVENT
23 // Forward to base class
24 NS_FORWARD_TO_UIEVENT
26 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
28 return FocusEventBinding::Wrap(aCx, this);
31 FocusEvent(EventTarget* aOwner,
32 nsPresContext* aPresContext,
33 InternalFocusEvent* aEvent);
35 EventTarget* GetRelatedTarget();
37 static already_AddRefed<FocusEvent> Constructor(const GlobalObject& aGlobal,
38 const nsAString& aType,
39 const FocusEventInit& aParam,
40 ErrorResult& aRv);
41 protected:
42 nsresult InitFocusEvent(const nsAString& aType,
43 bool aCanBubble,
44 bool aCancelable,
45 nsIDOMWindow* aView,
46 int32_t aDetail,
47 EventTarget* aRelatedTarget);
50 } // namespace dom
51 } // namespace mozilla
53 #endif // mozilla_dom_FocusEvent_h_