Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PTabContext.h"
8 :
9 :
10 : //-----------------------------------------------------------------------------
11 : // Method definitions for the IPDL type |struct PopupIPCTabContext|
12 : //
13 : namespace mozilla {
14 : namespace dom {
15 0 : MOZ_IMPLICIT PopupIPCTabContext::PopupIPCTabContext() :
16 0 : isMozBrowserElement_()
17 : {
18 0 : Init();
19 0 : }
20 :
21 0 : PopupIPCTabContext::~PopupIPCTabContext()
22 : {
23 0 : }
24 :
25 0 : auto PopupIPCTabContext::operator==(const PopupIPCTabContext& _o) const -> bool
26 : {
27 0 : if ((!((opener()) == ((_o).opener())))) {
28 0 : return false;
29 : }
30 0 : if ((!((isMozBrowserElement()) == ((_o).isMozBrowserElement())))) {
31 0 : return false;
32 : }
33 0 : return true;
34 : }
35 :
36 0 : auto PopupIPCTabContext::operator!=(const PopupIPCTabContext& _o) const -> bool
37 : {
38 0 : return (!(operator==(_o)));
39 : }
40 :
41 0 : auto PopupIPCTabContext::Init() -> void
42 : {
43 0 : }
44 :
45 0 : auto PopupIPCTabContext::Assign(
46 : const PBrowserOrId& _opener,
47 : const bool& _isMozBrowserElement) -> void
48 : {
49 0 : opener_ = _opener;
50 0 : isMozBrowserElement_ = _isMozBrowserElement;
51 0 : }
52 :
53 : } // namespace dom
54 : } // namespace mozilla
55 :
56 : //-----------------------------------------------------------------------------
57 : // Method definitions for the IPDL type |struct FrameIPCTabContext|
58 : //
59 : namespace mozilla {
60 : namespace dom {
61 2 : MOZ_IMPLICIT FrameIPCTabContext::FrameIPCTabContext() :
62 : originAttributes_(),
63 : isMozBrowserElement_(),
64 : isPrerendered_(),
65 : presentationURL_(),
66 : showAccelerators_(),
67 2 : showFocusRings_()
68 : {
69 2 : Init();
70 2 : }
71 :
72 6 : FrameIPCTabContext::~FrameIPCTabContext()
73 : {
74 6 : }
75 :
76 0 : auto FrameIPCTabContext::operator==(const FrameIPCTabContext& _o) const -> bool
77 : {
78 0 : if ((!((originAttributes()) == ((_o).originAttributes())))) {
79 0 : return false;
80 : }
81 0 : if ((!((isMozBrowserElement()) == ((_o).isMozBrowserElement())))) {
82 0 : return false;
83 : }
84 0 : if ((!((isPrerendered()) == ((_o).isPrerendered())))) {
85 0 : return false;
86 : }
87 0 : if ((!((presentationURL()) == ((_o).presentationURL())))) {
88 0 : return false;
89 : }
90 0 : if ((!((showAccelerators()) == ((_o).showAccelerators())))) {
91 0 : return false;
92 : }
93 0 : if ((!((showFocusRings()) == ((_o).showFocusRings())))) {
94 0 : return false;
95 : }
96 0 : return true;
97 : }
98 :
99 0 : auto FrameIPCTabContext::operator!=(const FrameIPCTabContext& _o) const -> bool
100 : {
101 0 : return (!(operator==(_o)));
102 : }
103 :
104 6 : auto FrameIPCTabContext::Init() -> void
105 : {
106 6 : }
107 :
108 5 : auto FrameIPCTabContext::Assign(
109 : const OriginAttributes& _originAttributes,
110 : const bool& _isMozBrowserElement,
111 : const bool& _isPrerendered,
112 : const nsString& _presentationURL,
113 : const UIStateChangeType& _showAccelerators,
114 : const UIStateChangeType& _showFocusRings) -> void
115 : {
116 5 : originAttributes_ = _originAttributes;
117 5 : isMozBrowserElement_ = _isMozBrowserElement;
118 5 : isPrerendered_ = _isPrerendered;
119 5 : presentationURL_ = _presentationURL;
120 5 : showAccelerators_ = _showAccelerators;
121 5 : showFocusRings_ = _showFocusRings;
122 5 : }
123 :
124 : } // namespace dom
125 : } // namespace mozilla
126 :
127 : //-----------------------------------------------------------------------------
128 : // Method definitions for the IPDL type |struct JSPluginFrameIPCTabContext|
129 : //
130 : namespace mozilla {
131 : namespace dom {
132 0 : MOZ_IMPLICIT JSPluginFrameIPCTabContext::JSPluginFrameIPCTabContext() :
133 0 : jsPluginId_()
134 : {
135 0 : Init();
136 0 : }
137 :
138 0 : JSPluginFrameIPCTabContext::~JSPluginFrameIPCTabContext()
139 : {
140 0 : }
141 :
142 0 : auto JSPluginFrameIPCTabContext::operator==(const JSPluginFrameIPCTabContext& _o) const -> bool
143 : {
144 0 : if ((!((jsPluginId()) == ((_o).jsPluginId())))) {
145 0 : return false;
146 : }
147 0 : return true;
148 : }
149 :
150 0 : auto JSPluginFrameIPCTabContext::operator!=(const JSPluginFrameIPCTabContext& _o) const -> bool
151 : {
152 0 : return (!(operator==(_o)));
153 : }
154 :
155 0 : auto JSPluginFrameIPCTabContext::Init() -> void
156 : {
157 0 : }
158 :
159 0 : auto JSPluginFrameIPCTabContext::Assign(const uint32_t& _jsPluginId) -> void
160 : {
161 0 : jsPluginId_ = _jsPluginId;
162 0 : }
163 :
164 : } // namespace dom
165 : } // namespace mozilla
166 :
167 : //-----------------------------------------------------------------------------
168 : // Method definitions for the IPDL type |struct UnsafeIPCTabContext|
169 : //
170 : namespace mozilla {
171 : namespace dom {
172 0 : UnsafeIPCTabContext::~UnsafeIPCTabContext()
173 : {
174 0 : }
175 :
176 0 : auto UnsafeIPCTabContext::operator==(const UnsafeIPCTabContext& _o) const -> bool
177 : {
178 0 : return true;
179 : }
180 :
181 0 : auto UnsafeIPCTabContext::operator!=(const UnsafeIPCTabContext& _o) const -> bool
182 : {
183 0 : return (!(operator==(_o)));
184 : }
185 :
186 0 : auto UnsafeIPCTabContext::Init() -> void
187 : {
188 0 : }
189 :
190 0 : auto UnsafeIPCTabContext::Assign() -> void
191 : {
192 0 : }
193 :
194 : } // namespace dom
195 : } // namespace mozilla
196 :
197 : //-----------------------------------------------------------------------------
198 : // Method definitions for the IPDL type |union IPCTabContext|
199 : //
200 : namespace mozilla {
201 : namespace dom {
202 4 : auto IPCTabContext::MaybeDestroy(Type aNewType) -> bool
203 : {
204 4 : if ((mType) == (T__None)) {
205 1 : return true;
206 : }
207 3 : if ((mType) == (aNewType)) {
208 0 : return false;
209 : }
210 3 : switch (mType) {
211 : case TPopupIPCTabContext:
212 : {
213 0 : (ptr_PopupIPCTabContext())->~PopupIPCTabContext__tdef();
214 0 : break;
215 : }
216 : case TFrameIPCTabContext:
217 : {
218 3 : (ptr_FrameIPCTabContext())->~FrameIPCTabContext__tdef();
219 3 : break;
220 : }
221 : case TJSPluginFrameIPCTabContext:
222 : {
223 0 : (ptr_JSPluginFrameIPCTabContext())->~JSPluginFrameIPCTabContext__tdef();
224 0 : break;
225 : }
226 : case TUnsafeIPCTabContext:
227 : {
228 0 : (ptr_UnsafeIPCTabContext())->~UnsafeIPCTabContext__tdef();
229 0 : break;
230 : }
231 : default:
232 : {
233 0 : mozilla::ipc::LogicError("not reached");
234 0 : break;
235 : }
236 : }
237 3 : return true;
238 : }
239 :
240 0 : MOZ_IMPLICIT IPCTabContext::IPCTabContext(const PopupIPCTabContext& aOther)
241 : {
242 0 : new (mozilla::KnownNotNull, ptr_PopupIPCTabContext()) PopupIPCTabContext(aOther);
243 0 : mType = TPopupIPCTabContext;
244 0 : }
245 :
246 2 : MOZ_IMPLICIT IPCTabContext::IPCTabContext(const FrameIPCTabContext& aOther)
247 : {
248 2 : new (mozilla::KnownNotNull, ptr_FrameIPCTabContext()) FrameIPCTabContext(aOther);
249 2 : mType = TFrameIPCTabContext;
250 2 : }
251 :
252 0 : MOZ_IMPLICIT IPCTabContext::IPCTabContext(const JSPluginFrameIPCTabContext& aOther)
253 : {
254 0 : new (mozilla::KnownNotNull, ptr_JSPluginFrameIPCTabContext()) JSPluginFrameIPCTabContext(aOther);
255 0 : mType = TJSPluginFrameIPCTabContext;
256 0 : }
257 :
258 0 : MOZ_IMPLICIT IPCTabContext::IPCTabContext(const UnsafeIPCTabContext& aOther)
259 : {
260 0 : new (mozilla::KnownNotNull, ptr_UnsafeIPCTabContext()) UnsafeIPCTabContext(aOther);
261 0 : mType = TUnsafeIPCTabContext;
262 0 : }
263 :
264 0 : MOZ_IMPLICIT IPCTabContext::IPCTabContext(const IPCTabContext& aOther)
265 : {
266 0 : (aOther).AssertSanity();
267 0 : switch ((aOther).type()) {
268 : case TPopupIPCTabContext:
269 : {
270 0 : new (mozilla::KnownNotNull, ptr_PopupIPCTabContext()) PopupIPCTabContext((aOther).get_PopupIPCTabContext());
271 0 : break;
272 : }
273 : case TFrameIPCTabContext:
274 : {
275 0 : new (mozilla::KnownNotNull, ptr_FrameIPCTabContext()) FrameIPCTabContext((aOther).get_FrameIPCTabContext());
276 0 : break;
277 : }
278 : case TJSPluginFrameIPCTabContext:
279 : {
280 0 : new (mozilla::KnownNotNull, ptr_JSPluginFrameIPCTabContext()) JSPluginFrameIPCTabContext((aOther).get_JSPluginFrameIPCTabContext());
281 0 : break;
282 : }
283 : case TUnsafeIPCTabContext:
284 : {
285 0 : new (mozilla::KnownNotNull, ptr_UnsafeIPCTabContext()) UnsafeIPCTabContext((aOther).get_UnsafeIPCTabContext());
286 0 : break;
287 : }
288 : case T__None:
289 : {
290 0 : break;
291 : }
292 : default:
293 : {
294 0 : mozilla::ipc::LogicError("unreached");
295 0 : return;
296 : }
297 : }
298 0 : mType = (aOther).type();
299 : }
300 :
301 6 : IPCTabContext::~IPCTabContext()
302 : {
303 3 : static_cast<void>(MaybeDestroy(T__None));
304 3 : }
305 :
306 0 : auto IPCTabContext::operator=(const PopupIPCTabContext& aRhs) -> IPCTabContext&
307 : {
308 0 : if (MaybeDestroy(TPopupIPCTabContext)) {
309 0 : new (mozilla::KnownNotNull, ptr_PopupIPCTabContext()) PopupIPCTabContext;
310 : }
311 0 : (*(ptr_PopupIPCTabContext())) = aRhs;
312 0 : mType = TPopupIPCTabContext;
313 0 : return (*(this));
314 : }
315 :
316 1 : auto IPCTabContext::operator=(const FrameIPCTabContext& aRhs) -> IPCTabContext&
317 : {
318 1 : if (MaybeDestroy(TFrameIPCTabContext)) {
319 1 : new (mozilla::KnownNotNull, ptr_FrameIPCTabContext()) FrameIPCTabContext;
320 : }
321 1 : (*(ptr_FrameIPCTabContext())) = aRhs;
322 1 : mType = TFrameIPCTabContext;
323 1 : return (*(this));
324 : }
325 :
326 0 : auto IPCTabContext::operator=(const JSPluginFrameIPCTabContext& aRhs) -> IPCTabContext&
327 : {
328 0 : if (MaybeDestroy(TJSPluginFrameIPCTabContext)) {
329 0 : new (mozilla::KnownNotNull, ptr_JSPluginFrameIPCTabContext()) JSPluginFrameIPCTabContext;
330 : }
331 0 : (*(ptr_JSPluginFrameIPCTabContext())) = aRhs;
332 0 : mType = TJSPluginFrameIPCTabContext;
333 0 : return (*(this));
334 : }
335 :
336 0 : auto IPCTabContext::operator=(const UnsafeIPCTabContext& aRhs) -> IPCTabContext&
337 : {
338 0 : if (MaybeDestroy(TUnsafeIPCTabContext)) {
339 0 : new (mozilla::KnownNotNull, ptr_UnsafeIPCTabContext()) UnsafeIPCTabContext;
340 : }
341 0 : (*(ptr_UnsafeIPCTabContext())) = aRhs;
342 0 : mType = TUnsafeIPCTabContext;
343 0 : return (*(this));
344 : }
345 :
346 0 : auto IPCTabContext::operator=(const IPCTabContext& aRhs) -> IPCTabContext&
347 : {
348 0 : (aRhs).AssertSanity();
349 0 : Type t = (aRhs).type();
350 0 : switch (t) {
351 : case TPopupIPCTabContext:
352 : {
353 0 : if (MaybeDestroy(t)) {
354 0 : new (mozilla::KnownNotNull, ptr_PopupIPCTabContext()) PopupIPCTabContext;
355 : }
356 0 : (*(ptr_PopupIPCTabContext())) = (aRhs).get_PopupIPCTabContext();
357 0 : break;
358 : }
359 : case TFrameIPCTabContext:
360 : {
361 0 : if (MaybeDestroy(t)) {
362 0 : new (mozilla::KnownNotNull, ptr_FrameIPCTabContext()) FrameIPCTabContext;
363 : }
364 0 : (*(ptr_FrameIPCTabContext())) = (aRhs).get_FrameIPCTabContext();
365 0 : break;
366 : }
367 : case TJSPluginFrameIPCTabContext:
368 : {
369 0 : if (MaybeDestroy(t)) {
370 0 : new (mozilla::KnownNotNull, ptr_JSPluginFrameIPCTabContext()) JSPluginFrameIPCTabContext;
371 : }
372 0 : (*(ptr_JSPluginFrameIPCTabContext())) = (aRhs).get_JSPluginFrameIPCTabContext();
373 0 : break;
374 : }
375 : case TUnsafeIPCTabContext:
376 : {
377 0 : if (MaybeDestroy(t)) {
378 0 : new (mozilla::KnownNotNull, ptr_UnsafeIPCTabContext()) UnsafeIPCTabContext;
379 : }
380 0 : (*(ptr_UnsafeIPCTabContext())) = (aRhs).get_UnsafeIPCTabContext();
381 0 : break;
382 : }
383 : case T__None:
384 : {
385 0 : static_cast<void>(MaybeDestroy(t));
386 0 : break;
387 : }
388 : default:
389 : {
390 0 : mozilla::ipc::LogicError("unreached");
391 0 : break;
392 : }
393 : }
394 0 : mType = t;
395 0 : return (*(this));
396 : }
397 :
398 0 : auto IPCTabContext::operator==(const PopupIPCTabContext& aRhs) const -> bool
399 : {
400 0 : return (get_PopupIPCTabContext()) == (aRhs);
401 : }
402 :
403 0 : auto IPCTabContext::operator==(const FrameIPCTabContext& aRhs) const -> bool
404 : {
405 0 : return (get_FrameIPCTabContext()) == (aRhs);
406 : }
407 :
408 0 : auto IPCTabContext::operator==(const JSPluginFrameIPCTabContext& aRhs) const -> bool
409 : {
410 0 : return (get_JSPluginFrameIPCTabContext()) == (aRhs);
411 : }
412 :
413 0 : auto IPCTabContext::operator==(const UnsafeIPCTabContext& aRhs) const -> bool
414 : {
415 0 : return (get_UnsafeIPCTabContext()) == (aRhs);
416 : }
417 :
418 0 : auto IPCTabContext::operator==(const IPCTabContext& aRhs) const -> bool
419 : {
420 0 : if ((type()) != ((aRhs).type())) {
421 0 : return false;
422 : }
423 :
424 0 : switch (type()) {
425 : case TPopupIPCTabContext:
426 : {
427 0 : return (get_PopupIPCTabContext()) == ((aRhs).get_PopupIPCTabContext());
428 : }
429 : case TFrameIPCTabContext:
430 : {
431 0 : return (get_FrameIPCTabContext()) == ((aRhs).get_FrameIPCTabContext());
432 : }
433 : case TJSPluginFrameIPCTabContext:
434 : {
435 0 : return (get_JSPluginFrameIPCTabContext()) == ((aRhs).get_JSPluginFrameIPCTabContext());
436 : }
437 : case TUnsafeIPCTabContext:
438 : {
439 0 : return (get_UnsafeIPCTabContext()) == ((aRhs).get_UnsafeIPCTabContext());
440 : }
441 : default:
442 : {
443 0 : mozilla::ipc::LogicError("unreached");
444 0 : return false;
445 : }
446 : }
447 : }
448 :
449 0 : auto IPCTabContext::get(PopupIPCTabContext* aOutValue) const -> void
450 : {
451 0 : (*(aOutValue)) = get_PopupIPCTabContext();
452 0 : }
453 :
454 0 : auto IPCTabContext::get(FrameIPCTabContext* aOutValue) const -> void
455 : {
456 0 : (*(aOutValue)) = get_FrameIPCTabContext();
457 0 : }
458 :
459 0 : auto IPCTabContext::get(JSPluginFrameIPCTabContext* aOutValue) const -> void
460 : {
461 0 : (*(aOutValue)) = get_JSPluginFrameIPCTabContext();
462 0 : }
463 :
464 0 : auto IPCTabContext::get(UnsafeIPCTabContext* aOutValue) const -> void
465 : {
466 0 : (*(aOutValue)) = get_UnsafeIPCTabContext();
467 0 : }
468 :
469 : } // namespace dom
470 : } // namespace mozilla
|