Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim:set ts=2 sw=2 sts=2 et cindent: */
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 : /* THIS FILE IS AUTOGENERATED FROM PageTransitionEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #include "EventBinding.h"
10 : #include "PageTransitionEvent.h"
11 : #include "PageTransitionEventBinding.h"
12 : #include "js/GCAPI.h"
13 : #include "mozilla/dom/Nullable.h"
14 : #include "mozilla/dom/PageTransitionEvent.h"
15 : #include "mozilla/dom/PrimitiveConversions.h"
16 :
17 : namespace mozilla {
18 : namespace dom {
19 :
20 :
21 : NS_IMPL_CYCLE_COLLECTION_CLASS(PageTransitionEvent)
22 :
23 21 : NS_IMPL_ADDREF_INHERITED(PageTransitionEvent, Event)
24 17 : NS_IMPL_RELEASE_INHERITED(PageTransitionEvent, Event)
25 :
26 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PageTransitionEvent, Event)
27 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
28 :
29 5 : NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PageTransitionEvent, Event)
30 5 : NS_IMPL_CYCLE_COLLECTION_TRACE_END
31 :
32 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PageTransitionEvent, Event)
33 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_END
34 :
35 79 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(PageTransitionEvent)
36 50 : NS_INTERFACE_MAP_END_INHERITING(Event)
37 :
38 9 : PageTransitionEvent::PageTransitionEvent(mozilla::dom::EventTarget* aOwner)
39 9 : : Event(aOwner, nullptr, nullptr)
40 : {
41 9 : }
42 :
43 10 : PageTransitionEvent::~PageTransitionEvent()
44 : {
45 15 : }
46 :
47 : PageTransitionEvent*
48 0 : PageTransitionEvent::AsPageTransitionEvent()
49 : {
50 0 : return this;
51 : }
52 :
53 : JSObject*
54 4 : PageTransitionEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
55 : {
56 4 : return PageTransitionEventBinding::Wrap(aCx, this, aGivenProto);
57 : }
58 :
59 : already_AddRefed<PageTransitionEvent>
60 9 : PageTransitionEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const PageTransitionEventInit& aEventInitDict)
61 : {
62 18 : RefPtr<PageTransitionEvent> e = new PageTransitionEvent(aOwner);
63 9 : bool trusted = e->Init(aOwner);
64 9 : e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
65 9 : e->mPersisted = aEventInitDict.mPersisted;
66 9 : e->SetTrusted(trusted);
67 9 : e->SetComposed(aEventInitDict.mComposed);
68 18 : return e.forget();
69 : }
70 :
71 : already_AddRefed<PageTransitionEvent>
72 0 : PageTransitionEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const PageTransitionEventInit& aEventInitDict, ErrorResult& aRv)
73 : {
74 0 : nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
75 0 : return Constructor(owner, aType, aEventInitDict);
76 : }
77 :
78 : bool
79 7 : PageTransitionEvent::Persisted() const
80 : {
81 7 : return mPersisted;
82 : }
83 :
84 :
85 : } // namespace dom
86 : } // namespace mozilla
|