LCOV - code coverage report
Current view: top level - dom/events - BeforeUnloadEvent.h (source / functions) Hit Total Coverage
Test: output.info Lines: 5 7 71.4 %
Date: 2017-07-14 16:53:18 Functions: 9 33 27.3 %
Legend: Lines: hit not hit

          Line data    Source code
       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/. */
       6             : 
       7             : #ifndef mozilla_dom_BeforeUnloadEvent_h_
       8             : #define mozilla_dom_BeforeUnloadEvent_h_
       9             : 
      10             : #include "mozilla/dom/BeforeUnloadEventBinding.h"
      11             : #include "mozilla/dom/Event.h"
      12             : #include "nsIDOMBeforeUnloadEvent.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : 
      17             : class BeforeUnloadEvent : public Event,
      18             :                           public nsIDOMBeforeUnloadEvent
      19             : {
      20             : public:
      21           5 :   BeforeUnloadEvent(EventTarget* aOwner,
      22             :                     nsPresContext* aPresContext,
      23             :                     WidgetEvent* aEvent)
      24           5 :     : Event(aOwner, aPresContext, aEvent)
      25             :   {
      26           5 :   }
      27             : 
      28           0 :   virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
      29             :   {
      30           0 :     return BeforeUnloadEventBinding::Wrap(aCx, this, aGivenProto);
      31             :   }
      32             : 
      33             :   NS_DECL_ISUPPORTS_INHERITED
      34             : 
      35             :   // Forward to Event
      36          40 :   NS_FORWARD_TO_EVENT
      37             : 
      38             :   // nsIDOMBeforeUnloadEvent Interface
      39             :   NS_DECL_NSIDOMBEFOREUNLOADEVENT
      40             : 
      41             : protected:
      42           9 :   ~BeforeUnloadEvent() {}
      43             : 
      44             :   nsString mText;
      45             : };
      46             : 
      47             : } // namespace dom
      48             : } // namespace mozilla
      49             : 
      50             : already_AddRefed<mozilla::dom::BeforeUnloadEvent>
      51             : NS_NewDOMBeforeUnloadEvent(mozilla::dom::EventTarget* aOwner,
      52             :                            nsPresContext* aPresContext,
      53             :                            mozilla::WidgetEvent* aEvent);
      54             : 
      55             : #endif // mozilla_dom_BeforeUnloadEvent_h_

Generated by: LCOV version 1.13