dom/events/FocusEvent.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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_

mercurial