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 /* 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
18 {
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
27 {
28 return FocusEventBinding::Wrap(aCx, this);
29 }
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);
48 };
50 } // namespace dom
51 } // namespace mozilla
53 #endif // mozilla_dom_FocusEvent_h_