Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM NetDashboard.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_NetDashboardBinding_h
4 : #define mozilla_dom_NetDashboardBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct ConnStatusDictAtoms;
16 : struct DNSCacheDictAtoms;
17 : struct DNSLookupDictAtoms;
18 : struct DnsCacheEntry;
19 : struct DnsCacheEntryAtoms;
20 : struct HalfOpenInfoDict;
21 : struct HalfOpenInfoDictAtoms;
22 : struct HttpConnDictAtoms;
23 : struct HttpConnInfo;
24 : struct HttpConnInfoAtoms;
25 : struct HttpConnectionElement;
26 : struct HttpConnectionElementAtoms;
27 : struct NativePropertyHooks;
28 : class ProtoAndIfaceCache;
29 : struct RcwnPerfStats;
30 : struct RcwnPerfStatsAtoms;
31 : struct RcwnStatusAtoms;
32 : struct SocketElement;
33 : struct SocketElementAtoms;
34 : struct SocketsDictAtoms;
35 : struct WebSocketDictAtoms;
36 : struct WebSocketElement;
37 : struct WebSocketElementAtoms;
38 :
39 : } // namespace dom
40 : } // namespace mozilla
41 :
42 : namespace mozilla {
43 : namespace dom {
44 :
45 0 : struct ConnStatusDict : public DictionaryBase
46 : {
47 : MOZ_INIT_OUTSIDE_CTOR nsString mStatus;
48 :
49 : ConnStatusDict();
50 :
51 : explicit inline ConnStatusDict(const FastDictionaryInitializer& )
52 : {
53 : // Do nothing here; this is used by our "Fast" subclass
54 : }
55 :
56 : explicit inline ConnStatusDict(const ConnStatusDict& aOther)
57 : {
58 : *this = aOther;
59 : }
60 :
61 : bool
62 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
63 :
64 : bool
65 : Init(const nsAString& aJSON);
66 :
67 : bool
68 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
69 :
70 : bool
71 : ToJSON(nsAString& aJSON) const;
72 :
73 : void
74 : TraceDictionary(JSTracer* trc);
75 :
76 : ConnStatusDict&
77 : operator=(const ConnStatusDict& aOther);
78 :
79 : private:
80 : static bool
81 : InitIds(JSContext* cx, ConnStatusDictAtoms* atomsCache);
82 : };
83 :
84 : namespace binding_detail {
85 : struct FastConnStatusDict : public ConnStatusDict
86 : {
87 : inline FastConnStatusDict()
88 : : ConnStatusDict(FastDictionaryInitializer())
89 : {
90 : // Doesn't matter what int we pass to the parent constructor
91 : }
92 : };
93 : } // namespace binding_detail
94 :
95 :
96 0 : struct DNSLookupDict : public DictionaryBase
97 : {
98 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mAddress;
99 : MOZ_INIT_OUTSIDE_CTOR bool mAnswer;
100 : MOZ_INIT_OUTSIDE_CTOR nsString mError;
101 :
102 : DNSLookupDict();
103 :
104 : explicit inline DNSLookupDict(const FastDictionaryInitializer& )
105 : {
106 : // Do nothing here; this is used by our "Fast" subclass
107 : }
108 :
109 : explicit inline DNSLookupDict(const DNSLookupDict& aOther)
110 : {
111 : *this = aOther;
112 : }
113 :
114 : bool
115 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
116 :
117 : bool
118 : Init(const nsAString& aJSON);
119 :
120 : bool
121 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
122 :
123 : bool
124 : ToJSON(nsAString& aJSON) const;
125 :
126 : void
127 : TraceDictionary(JSTracer* trc);
128 :
129 : DNSLookupDict&
130 : operator=(const DNSLookupDict& aOther);
131 :
132 : private:
133 : static bool
134 : InitIds(JSContext* cx, DNSLookupDictAtoms* atomsCache);
135 : };
136 :
137 : namespace binding_detail {
138 : struct FastDNSLookupDict : public DNSLookupDict
139 : {
140 : inline FastDNSLookupDict()
141 : : DNSLookupDict(FastDictionaryInitializer())
142 : {
143 : // Doesn't matter what int we pass to the parent constructor
144 : }
145 : };
146 : } // namespace binding_detail
147 :
148 :
149 0 : struct DnsCacheEntry : public DictionaryBase
150 : {
151 : MOZ_INIT_OUTSIDE_CTOR double mExpiration;
152 : MOZ_INIT_OUTSIDE_CTOR nsString mFamily;
153 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mHostaddr;
154 : MOZ_INIT_OUTSIDE_CTOR nsString mHostname;
155 :
156 : DnsCacheEntry();
157 :
158 : explicit inline DnsCacheEntry(const FastDictionaryInitializer& )
159 : {
160 : // Do nothing here; this is used by our "Fast" subclass
161 : }
162 :
163 0 : explicit inline DnsCacheEntry(const DnsCacheEntry& aOther)
164 0 : {
165 0 : *this = aOther;
166 0 : }
167 :
168 : bool
169 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
170 :
171 : bool
172 : Init(const nsAString& aJSON);
173 :
174 : bool
175 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
176 :
177 : bool
178 : ToJSON(nsAString& aJSON) const;
179 :
180 : void
181 : TraceDictionary(JSTracer* trc);
182 :
183 : DnsCacheEntry&
184 : operator=(const DnsCacheEntry& aOther);
185 :
186 : private:
187 : static bool
188 : InitIds(JSContext* cx, DnsCacheEntryAtoms* atomsCache);
189 : };
190 :
191 : namespace binding_detail {
192 : struct FastDnsCacheEntry : public DnsCacheEntry
193 : {
194 : inline FastDnsCacheEntry()
195 : : DnsCacheEntry(FastDictionaryInitializer())
196 : {
197 : // Doesn't matter what int we pass to the parent constructor
198 : }
199 : };
200 : } // namespace binding_detail
201 :
202 :
203 : struct HalfOpenInfoDict : public DictionaryBase
204 : {
205 : MOZ_INIT_OUTSIDE_CTOR bool mSpeculative;
206 :
207 : HalfOpenInfoDict();
208 :
209 : explicit inline HalfOpenInfoDict(const FastDictionaryInitializer& )
210 : {
211 : // Do nothing here; this is used by our "Fast" subclass
212 : }
213 :
214 0 : explicit inline HalfOpenInfoDict(const HalfOpenInfoDict& aOther)
215 0 : {
216 0 : *this = aOther;
217 0 : }
218 :
219 : bool
220 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
221 :
222 : bool
223 : Init(const nsAString& aJSON);
224 :
225 : bool
226 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
227 :
228 : bool
229 : ToJSON(nsAString& aJSON) const;
230 :
231 : void
232 : TraceDictionary(JSTracer* trc);
233 :
234 : HalfOpenInfoDict&
235 : operator=(const HalfOpenInfoDict& aOther);
236 :
237 : private:
238 : static bool
239 : InitIds(JSContext* cx, HalfOpenInfoDictAtoms* atomsCache);
240 : };
241 :
242 : namespace binding_detail {
243 : struct FastHalfOpenInfoDict : public HalfOpenInfoDict
244 : {
245 : inline FastHalfOpenInfoDict()
246 : : HalfOpenInfoDict(FastDictionaryInitializer())
247 : {
248 : // Doesn't matter what int we pass to the parent constructor
249 : }
250 : };
251 : } // namespace binding_detail
252 :
253 :
254 0 : struct HttpConnInfo : public DictionaryBase
255 : {
256 : MOZ_INIT_OUTSIDE_CTOR nsString mProtocolVersion;
257 : MOZ_INIT_OUTSIDE_CTOR uint32_t mRtt;
258 : MOZ_INIT_OUTSIDE_CTOR uint32_t mTtl;
259 :
260 : HttpConnInfo();
261 :
262 : explicit inline HttpConnInfo(const FastDictionaryInitializer& )
263 : {
264 : // Do nothing here; this is used by our "Fast" subclass
265 : }
266 :
267 0 : explicit inline HttpConnInfo(const HttpConnInfo& aOther)
268 0 : {
269 0 : *this = aOther;
270 0 : }
271 :
272 : bool
273 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
274 :
275 : bool
276 : Init(const nsAString& aJSON);
277 :
278 : bool
279 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
280 :
281 : bool
282 : ToJSON(nsAString& aJSON) const;
283 :
284 : void
285 : TraceDictionary(JSTracer* trc);
286 :
287 : HttpConnInfo&
288 : operator=(const HttpConnInfo& aOther);
289 :
290 : private:
291 : static bool
292 : InitIds(JSContext* cx, HttpConnInfoAtoms* atomsCache);
293 : };
294 :
295 : namespace binding_detail {
296 : struct FastHttpConnInfo : public HttpConnInfo
297 : {
298 : inline FastHttpConnInfo()
299 : : HttpConnInfo(FastDictionaryInitializer())
300 : {
301 : // Doesn't matter what int we pass to the parent constructor
302 : }
303 : };
304 : } // namespace binding_detail
305 :
306 :
307 : struct RcwnPerfStats : public DictionaryBase
308 : {
309 : MOZ_INIT_OUTSIDE_CTOR uint32_t mAvgLong;
310 : MOZ_INIT_OUTSIDE_CTOR uint32_t mAvgShort;
311 : MOZ_INIT_OUTSIDE_CTOR uint32_t mStddevLong;
312 :
313 : RcwnPerfStats();
314 :
315 : explicit inline RcwnPerfStats(const FastDictionaryInitializer& )
316 : {
317 : // Do nothing here; this is used by our "Fast" subclass
318 : }
319 :
320 0 : explicit inline RcwnPerfStats(const RcwnPerfStats& aOther)
321 0 : {
322 0 : *this = aOther;
323 0 : }
324 :
325 : bool
326 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
327 :
328 : bool
329 : Init(const nsAString& aJSON);
330 :
331 : bool
332 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
333 :
334 : bool
335 : ToJSON(nsAString& aJSON) const;
336 :
337 : void
338 : TraceDictionary(JSTracer* trc);
339 :
340 : RcwnPerfStats&
341 : operator=(const RcwnPerfStats& aOther);
342 :
343 : private:
344 : static bool
345 : InitIds(JSContext* cx, RcwnPerfStatsAtoms* atomsCache);
346 : };
347 :
348 : namespace binding_detail {
349 : struct FastRcwnPerfStats : public RcwnPerfStats
350 : {
351 : inline FastRcwnPerfStats()
352 : : RcwnPerfStats(FastDictionaryInitializer())
353 : {
354 : // Doesn't matter what int we pass to the parent constructor
355 : }
356 : };
357 : } // namespace binding_detail
358 :
359 :
360 0 : struct SocketElement : public DictionaryBase
361 : {
362 : MOZ_INIT_OUTSIDE_CTOR bool mActive;
363 : MOZ_INIT_OUTSIDE_CTOR nsString mHost;
364 : MOZ_INIT_OUTSIDE_CTOR uint32_t mPort;
365 : MOZ_INIT_OUTSIDE_CTOR double mReceived;
366 : MOZ_INIT_OUTSIDE_CTOR double mSent;
367 : MOZ_INIT_OUTSIDE_CTOR bool mTcp;
368 :
369 : SocketElement();
370 :
371 : explicit inline SocketElement(const FastDictionaryInitializer& )
372 : {
373 : // Do nothing here; this is used by our "Fast" subclass
374 : }
375 :
376 0 : explicit inline SocketElement(const SocketElement& aOther)
377 0 : {
378 0 : *this = aOther;
379 0 : }
380 :
381 : bool
382 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
383 :
384 : bool
385 : Init(const nsAString& aJSON);
386 :
387 : bool
388 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
389 :
390 : bool
391 : ToJSON(nsAString& aJSON) const;
392 :
393 : void
394 : TraceDictionary(JSTracer* trc);
395 :
396 : SocketElement&
397 : operator=(const SocketElement& aOther);
398 :
399 : private:
400 : static bool
401 : InitIds(JSContext* cx, SocketElementAtoms* atomsCache);
402 : };
403 :
404 : namespace binding_detail {
405 : struct FastSocketElement : public SocketElement
406 : {
407 : inline FastSocketElement()
408 : : SocketElement(FastDictionaryInitializer())
409 : {
410 : // Doesn't matter what int we pass to the parent constructor
411 : }
412 : };
413 : } // namespace binding_detail
414 :
415 :
416 0 : struct WebSocketElement : public DictionaryBase
417 : {
418 : MOZ_INIT_OUTSIDE_CTOR bool mEncrypted;
419 : MOZ_INIT_OUTSIDE_CTOR nsString mHostport;
420 : MOZ_INIT_OUTSIDE_CTOR uint32_t mMsgreceived;
421 : MOZ_INIT_OUTSIDE_CTOR uint32_t mMsgsent;
422 : MOZ_INIT_OUTSIDE_CTOR double mReceivedsize;
423 : MOZ_INIT_OUTSIDE_CTOR double mSentsize;
424 :
425 : WebSocketElement();
426 :
427 : explicit inline WebSocketElement(const FastDictionaryInitializer& )
428 : {
429 : // Do nothing here; this is used by our "Fast" subclass
430 : }
431 :
432 0 : explicit inline WebSocketElement(const WebSocketElement& aOther)
433 0 : {
434 0 : *this = aOther;
435 0 : }
436 :
437 : bool
438 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
439 :
440 : bool
441 : Init(const nsAString& aJSON);
442 :
443 : bool
444 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
445 :
446 : bool
447 : ToJSON(nsAString& aJSON) const;
448 :
449 : void
450 : TraceDictionary(JSTracer* trc);
451 :
452 : WebSocketElement&
453 : operator=(const WebSocketElement& aOther);
454 :
455 : private:
456 : static bool
457 : InitIds(JSContext* cx, WebSocketElementAtoms* atomsCache);
458 : };
459 :
460 : namespace binding_detail {
461 : struct FastWebSocketElement : public WebSocketElement
462 : {
463 : inline FastWebSocketElement()
464 : : WebSocketElement(FastDictionaryInitializer())
465 : {
466 : // Doesn't matter what int we pass to the parent constructor
467 : }
468 : };
469 : } // namespace binding_detail
470 :
471 :
472 0 : struct DNSCacheDict : public DictionaryBase
473 : {
474 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<DnsCacheEntry>> mEntries;
475 :
476 : DNSCacheDict();
477 :
478 : explicit inline DNSCacheDict(const FastDictionaryInitializer& )
479 : {
480 : // Do nothing here; this is used by our "Fast" subclass
481 : }
482 :
483 : explicit inline DNSCacheDict(const DNSCacheDict& aOther)
484 : {
485 : *this = aOther;
486 : }
487 :
488 : bool
489 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
490 :
491 : bool
492 : Init(const nsAString& aJSON);
493 :
494 : bool
495 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
496 :
497 : bool
498 : ToJSON(nsAString& aJSON) const;
499 :
500 : void
501 : TraceDictionary(JSTracer* trc);
502 :
503 : DNSCacheDict&
504 : operator=(const DNSCacheDict& aOther);
505 :
506 : private:
507 : static bool
508 : InitIds(JSContext* cx, DNSCacheDictAtoms* atomsCache);
509 : };
510 :
511 : namespace binding_detail {
512 : struct FastDNSCacheDict : public DNSCacheDict
513 : {
514 : inline FastDNSCacheDict()
515 : : DNSCacheDict(FastDictionaryInitializer())
516 : {
517 : // Doesn't matter what int we pass to the parent constructor
518 : }
519 : };
520 : } // namespace binding_detail
521 :
522 :
523 0 : struct HttpConnectionElement : public DictionaryBase
524 : {
525 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HttpConnInfo>> mActive;
526 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HalfOpenInfoDict>> mHalfOpens;
527 : MOZ_INIT_OUTSIDE_CTOR nsString mHost;
528 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HttpConnInfo>> mIdle;
529 : MOZ_INIT_OUTSIDE_CTOR uint32_t mPort;
530 : MOZ_INIT_OUTSIDE_CTOR bool mSpdy;
531 : MOZ_INIT_OUTSIDE_CTOR bool mSsl;
532 :
533 : HttpConnectionElement();
534 :
535 : explicit inline HttpConnectionElement(const FastDictionaryInitializer& )
536 : {
537 : // Do nothing here; this is used by our "Fast" subclass
538 : }
539 :
540 0 : explicit inline HttpConnectionElement(const HttpConnectionElement& aOther)
541 0 : {
542 0 : *this = aOther;
543 0 : }
544 :
545 : bool
546 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
547 :
548 : bool
549 : Init(const nsAString& aJSON);
550 :
551 : bool
552 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
553 :
554 : bool
555 : ToJSON(nsAString& aJSON) const;
556 :
557 : void
558 : TraceDictionary(JSTracer* trc);
559 :
560 : HttpConnectionElement&
561 : operator=(const HttpConnectionElement& aOther);
562 :
563 : private:
564 : static bool
565 : InitIds(JSContext* cx, HttpConnectionElementAtoms* atomsCache);
566 : };
567 :
568 : namespace binding_detail {
569 : struct FastHttpConnectionElement : public HttpConnectionElement
570 : {
571 : inline FastHttpConnectionElement()
572 : : HttpConnectionElement(FastDictionaryInitializer())
573 : {
574 : // Doesn't matter what int we pass to the parent constructor
575 : }
576 : };
577 : } // namespace binding_detail
578 :
579 :
580 0 : struct RcwnStatus : public DictionaryBase
581 : {
582 : MOZ_INIT_OUTSIDE_CTOR uint32_t mCacheNotSlowCount;
583 : MOZ_INIT_OUTSIDE_CTOR uint32_t mCacheSlowCount;
584 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<RcwnPerfStats>> mPerfStats;
585 : MOZ_INIT_OUTSIDE_CTOR uint32_t mRcwnCacheWonCount;
586 : MOZ_INIT_OUTSIDE_CTOR uint32_t mRcwnNetWonCount;
587 : MOZ_INIT_OUTSIDE_CTOR uint32_t mTotalNetworkRequests;
588 :
589 : RcwnStatus();
590 :
591 : explicit inline RcwnStatus(const FastDictionaryInitializer& )
592 : {
593 : // Do nothing here; this is used by our "Fast" subclass
594 : }
595 :
596 : explicit inline RcwnStatus(const RcwnStatus& aOther)
597 : {
598 : *this = aOther;
599 : }
600 :
601 : bool
602 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
603 :
604 : bool
605 : Init(const nsAString& aJSON);
606 :
607 : bool
608 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
609 :
610 : bool
611 : ToJSON(nsAString& aJSON) const;
612 :
613 : void
614 : TraceDictionary(JSTracer* trc);
615 :
616 : RcwnStatus&
617 : operator=(const RcwnStatus& aOther);
618 :
619 : private:
620 : static bool
621 : InitIds(JSContext* cx, RcwnStatusAtoms* atomsCache);
622 : };
623 :
624 : namespace binding_detail {
625 : struct FastRcwnStatus : public RcwnStatus
626 : {
627 : inline FastRcwnStatus()
628 : : RcwnStatus(FastDictionaryInitializer())
629 : {
630 : // Doesn't matter what int we pass to the parent constructor
631 : }
632 : };
633 : } // namespace binding_detail
634 :
635 :
636 0 : struct SocketsDict : public DictionaryBase
637 : {
638 : MOZ_INIT_OUTSIDE_CTOR double mReceived;
639 : MOZ_INIT_OUTSIDE_CTOR double mSent;
640 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<SocketElement>> mSockets;
641 :
642 : SocketsDict();
643 :
644 : explicit inline SocketsDict(const FastDictionaryInitializer& )
645 : {
646 : // Do nothing here; this is used by our "Fast" subclass
647 : }
648 :
649 : explicit inline SocketsDict(const SocketsDict& aOther)
650 : {
651 : *this = aOther;
652 : }
653 :
654 : bool
655 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
656 :
657 : bool
658 : Init(const nsAString& aJSON);
659 :
660 : bool
661 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
662 :
663 : bool
664 : ToJSON(nsAString& aJSON) const;
665 :
666 : void
667 : TraceDictionary(JSTracer* trc);
668 :
669 : SocketsDict&
670 : operator=(const SocketsDict& aOther);
671 :
672 : private:
673 : static bool
674 : InitIds(JSContext* cx, SocketsDictAtoms* atomsCache);
675 : };
676 :
677 : namespace binding_detail {
678 : struct FastSocketsDict : public SocketsDict
679 : {
680 : inline FastSocketsDict()
681 : : SocketsDict(FastDictionaryInitializer())
682 : {
683 : // Doesn't matter what int we pass to the parent constructor
684 : }
685 : };
686 : } // namespace binding_detail
687 :
688 :
689 0 : struct WebSocketDict : public DictionaryBase
690 : {
691 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<WebSocketElement>> mWebsockets;
692 :
693 : WebSocketDict();
694 :
695 : explicit inline WebSocketDict(const FastDictionaryInitializer& )
696 : {
697 : // Do nothing here; this is used by our "Fast" subclass
698 : }
699 :
700 : explicit inline WebSocketDict(const WebSocketDict& aOther)
701 : {
702 : *this = aOther;
703 : }
704 :
705 : bool
706 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
707 :
708 : bool
709 : Init(const nsAString& aJSON);
710 :
711 : bool
712 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
713 :
714 : bool
715 : ToJSON(nsAString& aJSON) const;
716 :
717 : void
718 : TraceDictionary(JSTracer* trc);
719 :
720 : WebSocketDict&
721 : operator=(const WebSocketDict& aOther);
722 :
723 : private:
724 : static bool
725 : InitIds(JSContext* cx, WebSocketDictAtoms* atomsCache);
726 : };
727 :
728 : namespace binding_detail {
729 : struct FastWebSocketDict : public WebSocketDict
730 : {
731 : inline FastWebSocketDict()
732 : : WebSocketDict(FastDictionaryInitializer())
733 : {
734 : // Doesn't matter what int we pass to the parent constructor
735 : }
736 : };
737 : } // namespace binding_detail
738 :
739 :
740 0 : struct HttpConnDict : public DictionaryBase
741 : {
742 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<HttpConnectionElement>> mConnections;
743 :
744 : HttpConnDict();
745 :
746 : explicit inline HttpConnDict(const FastDictionaryInitializer& )
747 : {
748 : // Do nothing here; this is used by our "Fast" subclass
749 : }
750 :
751 : explicit inline HttpConnDict(const HttpConnDict& aOther)
752 : {
753 : *this = aOther;
754 : }
755 :
756 : bool
757 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
758 :
759 : bool
760 : Init(const nsAString& aJSON);
761 :
762 : bool
763 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
764 :
765 : bool
766 : ToJSON(nsAString& aJSON) const;
767 :
768 : void
769 : TraceDictionary(JSTracer* trc);
770 :
771 : HttpConnDict&
772 : operator=(const HttpConnDict& aOther);
773 :
774 : private:
775 : static bool
776 : InitIds(JSContext* cx, HttpConnDictAtoms* atomsCache);
777 : };
778 :
779 : namespace binding_detail {
780 : struct FastHttpConnDict : public HttpConnDict
781 : {
782 : inline FastHttpConnDict()
783 : : HttpConnDict(FastDictionaryInitializer())
784 : {
785 : // Doesn't matter what int we pass to the parent constructor
786 : }
787 : };
788 : } // namespace binding_detail
789 :
790 :
791 : } // namespace dom
792 : } // namespace mozilla
793 :
794 : #endif // mozilla_dom_NetDashboardBinding_h
|