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 PopupBlockedEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #include "EventBinding.h"
10 : #include "PopupBlockedEvent.h"
11 : #include "PopupBlockedEventBinding.h"
12 : #include "js/GCAPI.h"
13 : #include "mozilla/dom/Nullable.h"
14 : #include "mozilla/dom/PopupBlockedEvent.h"
15 : #include "mozilla/dom/PrimitiveConversions.h"
16 : #include "nsGlobalWindow.h"
17 : #include "nsIURI.h"
18 :
19 : namespace mozilla {
20 : namespace dom {
21 :
22 :
23 : NS_IMPL_CYCLE_COLLECTION_CLASS(PopupBlockedEvent)
24 :
25 0 : NS_IMPL_ADDREF_INHERITED(PopupBlockedEvent, Event)
26 0 : NS_IMPL_RELEASE_INHERITED(PopupBlockedEvent, Event)
27 :
28 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PopupBlockedEvent, Event)
29 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRequestingWindow)
30 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPopupWindowURI)
31 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
32 :
33 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PopupBlockedEvent, Event)
34 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_END
35 :
36 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PopupBlockedEvent, Event)
37 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK(mRequestingWindow)
38 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK(mPopupWindowURI)
39 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_END
40 :
41 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(PopupBlockedEvent)
42 0 : NS_INTERFACE_MAP_END_INHERITING(Event)
43 :
44 0 : PopupBlockedEvent::PopupBlockedEvent(mozilla::dom::EventTarget* aOwner)
45 0 : : Event(aOwner, nullptr, nullptr)
46 : {
47 0 : }
48 :
49 0 : PopupBlockedEvent::~PopupBlockedEvent()
50 : {
51 0 : }
52 :
53 : PopupBlockedEvent*
54 0 : PopupBlockedEvent::AsPopupBlockedEvent()
55 : {
56 0 : return this;
57 : }
58 :
59 : JSObject*
60 0 : PopupBlockedEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
61 : {
62 0 : return PopupBlockedEventBinding::Wrap(aCx, this, aGivenProto);
63 : }
64 :
65 : already_AddRefed<PopupBlockedEvent>
66 0 : PopupBlockedEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const PopupBlockedEventInit& aEventInitDict)
67 : {
68 0 : RefPtr<PopupBlockedEvent> e = new PopupBlockedEvent(aOwner);
69 0 : bool trusted = e->Init(aOwner);
70 0 : e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
71 0 : e->mRequestingWindow = aEventInitDict.mRequestingWindow;
72 0 : e->mPopupWindowURI = aEventInitDict.mPopupWindowURI;
73 0 : e->mPopupWindowName = aEventInitDict.mPopupWindowName;
74 0 : e->mPopupWindowFeatures = aEventInitDict.mPopupWindowFeatures;
75 0 : e->SetTrusted(trusted);
76 0 : e->SetComposed(aEventInitDict.mComposed);
77 0 : return e.forget();
78 : }
79 :
80 : already_AddRefed<PopupBlockedEvent>
81 0 : PopupBlockedEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const PopupBlockedEventInit& aEventInitDict, ErrorResult& aRv)
82 : {
83 0 : nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
84 0 : return Constructor(owner, aType, aEventInitDict);
85 : }
86 :
87 : nsGlobalWindow*
88 0 : PopupBlockedEvent::GetRequestingWindow() const
89 : {
90 0 : return mRequestingWindow;
91 : }
92 :
93 : nsIURI*
94 0 : PopupBlockedEvent::GetPopupWindowURI() const
95 : {
96 0 : return mPopupWindowURI;
97 : }
98 :
99 : void
100 0 : PopupBlockedEvent::GetPopupWindowName(nsString& aRetVal) const
101 : {
102 0 : aRetVal = mPopupWindowName;
103 0 : }
104 :
105 : void
106 0 : PopupBlockedEvent::GetPopupWindowFeatures(nsString& aRetVal) const
107 : {
108 0 : aRetVal = mPopupWindowFeatures;
109 0 : }
110 :
111 :
112 : } // namespace dom
113 : } // namespace mozilla
|