1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PContent.h"
8 :
9 : namespace mozilla {
10 : namespace dom {
11 : namespace PContent {
12 :
13 : bool
14 0 : Transition(
15 : State from,
16 : mozilla::ipc::Trigger trigger,
17 : State* next)
18 : {
19 0 : switch (from) {
20 : case __Null:
21 : case __Error:
22 0 : return (__Null) == (from);
23 : case __Dead:
24 0 : NS_RUNTIMEABORT("__delete__()d actor");
25 0 : return false;
26 : default:
27 0 : NS_RUNTIMEABORT("corrupted actor state");
28 0 : return false;
29 : }
30 : (*(next)) = __Error;
31 : return false;
32 : }
33 :
34 : } // namespace PContent
35 : } // namespace dom
36 : } // namespace mozilla
37 :
38 : //-----------------------------------------------------------------------------
39 : // Method definitions for the IPDL type |struct StorageClone|
40 : //
41 : namespace mozilla {
42 : namespace dom {
43 0 : StorageClone::StorageClone()
44 : {
45 0 : Init();
46 0 : }
47 :
48 0 : StorageClone::~StorageClone()
49 : {
50 0 : }
51 :
52 : bool
53 0 : StorageClone::operator==(const StorageClone& _o) const
54 : {
55 0 : if ((!((actorParent()) == ((_o).actorParent())))) {
56 0 : return false;
57 : }
58 0 : if ((!((actorChild()) == ((_o).actorChild())))) {
59 0 : return false;
60 : }
61 0 : if ((!((callerSecure()) == ((_o).callerSecure())))) {
62 0 : return false;
63 : }
64 0 : return true;
65 : }
66 :
67 : void
68 0 : StorageClone::Init()
69 : {
70 0 : }
71 :
72 : void
73 0 : StorageClone::Assign(
74 : PStorageParent* _actorParent,
75 : PStorageChild* _actorChild,
76 : const bool& _callerSecure)
77 : {
78 0 : actorParent_ = _actorParent;
79 0 : actorChild_ = _actorChild;
80 0 : callerSecure_ = _callerSecure;
81 0 : }
82 :
83 : } // namespace dom
84 : } // namespace mozilla
85 :
86 : //-----------------------------------------------------------------------------
87 : // Method definitions for the IPDL type |union StorageConstructData|
88 : //
89 : namespace mozilla {
90 : namespace dom {
91 : bool
92 0 : StorageConstructData::MaybeDestroy(Type aNewType)
93 : {
94 0 : if ((mType) == (T__None)) {
95 0 : return true;
96 : }
97 0 : if ((mType) == (aNewType)) {
98 0 : return false;
99 : }
100 0 : switch (mType) {
101 : case Tnull_t:
102 : {
103 0 : (ptr_null_t())->~null_t__tdef();
104 0 : break;
105 : }
106 : case TStorageClone:
107 : {
108 0 : (ptr_StorageClone())->~StorageClone__tdef();
109 0 : break;
110 : }
111 : default:
112 : {
113 0 : NS_RUNTIMEABORT("not reached");
114 0 : break;
115 : }
116 : }
117 0 : return true;
118 : }
119 :
120 0 : StorageConstructData::StorageConstructData(const null_t& aOther)
121 : {
122 0 : new (ptr_null_t()) null_t(aOther);
123 0 : mType = Tnull_t;
124 0 : }
125 :
126 0 : StorageConstructData::StorageConstructData(const StorageClone& aOther)
127 : {
128 0 : new (ptr_StorageClone()) StorageClone(aOther);
129 0 : mType = TStorageClone;
130 0 : }
131 :
132 0 : StorageConstructData::StorageConstructData(const StorageConstructData& aOther)
133 : {
134 0 : (aOther).AssertSanity();
135 0 : switch ((aOther).type()) {
136 : case Tnull_t:
137 : {
138 0 : new (ptr_null_t()) null_t((aOther).get_null_t());
139 0 : break;
140 : }
141 : case TStorageClone:
142 : {
143 0 : new (ptr_StorageClone()) StorageClone((aOther).get_StorageClone());
144 0 : break;
145 : }
146 : case T__None:
147 : {
148 0 : break;
149 : }
150 : default:
151 : {
152 0 : NS_RUNTIMEABORT("unreached");
153 0 : return;
154 : }
155 : }
156 0 : mType = (aOther).type();
157 : }
158 :
159 0 : StorageConstructData::~StorageConstructData()
160 : {
161 0 : MaybeDestroy(T__None);
162 0 : }
163 :
164 : StorageConstructData&
165 0 : StorageConstructData::operator=(const null_t& aRhs)
166 : {
167 0 : if (MaybeDestroy(Tnull_t)) {
168 0 : new (ptr_null_t()) null_t;
169 : }
170 0 : (*(ptr_null_t())) = aRhs;
171 0 : mType = Tnull_t;
172 0 : return (*(this));
173 : }
174 :
175 : StorageConstructData&
176 0 : StorageConstructData::operator=(const StorageClone& aRhs)
177 : {
178 0 : if (MaybeDestroy(TStorageClone)) {
179 0 : new (ptr_StorageClone()) StorageClone;
180 : }
181 0 : (*(ptr_StorageClone())) = aRhs;
182 0 : mType = TStorageClone;
183 0 : return (*(this));
184 : }
185 :
186 : StorageConstructData&
187 0 : StorageConstructData::operator=(const StorageConstructData& aRhs)
188 : {
189 0 : (aRhs).AssertSanity();
190 0 : Type t = (aRhs).type();
191 0 : switch (t) {
192 : case Tnull_t:
193 : {
194 0 : if (MaybeDestroy(t)) {
195 0 : new (ptr_null_t()) null_t;
196 : }
197 0 : (*(ptr_null_t())) = (aRhs).get_null_t();
198 0 : break;
199 : }
200 : case TStorageClone:
201 : {
202 0 : if (MaybeDestroy(t)) {
203 0 : new (ptr_StorageClone()) StorageClone;
204 : }
205 0 : (*(ptr_StorageClone())) = (aRhs).get_StorageClone();
206 0 : break;
207 : }
208 : case T__None:
209 : {
210 0 : MaybeDestroy(t);
211 0 : break;
212 : }
213 : default:
214 : {
215 0 : NS_RUNTIMEABORT("unreached");
216 0 : break;
217 : }
218 : }
219 0 : mType = t;
220 0 : return (*(this));
221 : }
222 :
223 : bool
224 0 : StorageConstructData::operator==(const null_t& aRhs) const
225 : {
226 0 : return (get_null_t()) == (aRhs);
227 : }
228 :
229 : bool
230 0 : StorageConstructData::operator==(const StorageClone& aRhs) const
231 : {
232 0 : return (get_StorageClone()) == (aRhs);
233 : }
234 :
235 : bool
236 0 : StorageConstructData::operator==(const StorageConstructData& aRhs) const
237 : {
238 0 : if ((type()) != ((aRhs).type())) {
239 0 : return false;
240 : }
241 :
242 0 : switch (type()) {
243 : case Tnull_t:
244 : {
245 0 : return (get_null_t()) == ((aRhs).get_null_t());
246 : }
247 : case TStorageClone:
248 : {
249 0 : return (get_StorageClone()) == ((aRhs).get_StorageClone());
250 : }
251 : default:
252 : {
253 0 : NS_RUNTIMEABORT("unreached");
254 0 : return false;
255 : }
256 : }
257 : }
258 :
259 : } // namespace dom
260 : } // namespace mozilla
261 :
262 : //-----------------------------------------------------------------------------
263 : // Method definitions for the IPDL type |struct FontListEntry|
264 : //
265 : namespace mozilla {
266 : namespace dom {
267 0 : FontListEntry::FontListEntry()
268 : {
269 0 : Init();
270 0 : }
271 :
272 0 : FontListEntry::~FontListEntry()
273 : {
274 0 : }
275 :
276 : bool
277 0 : FontListEntry::operator==(const FontListEntry& _o) const
278 : {
279 0 : if ((!((familyName()) == ((_o).familyName())))) {
280 0 : return false;
281 : }
282 0 : if ((!((faceName()) == ((_o).faceName())))) {
283 0 : return false;
284 : }
285 0 : if ((!((filepath()) == ((_o).filepath())))) {
286 0 : return false;
287 : }
288 0 : if ((!((weight()) == ((_o).weight())))) {
289 0 : return false;
290 : }
291 0 : if ((!((stretch()) == ((_o).stretch())))) {
292 0 : return false;
293 : }
294 0 : if ((!((italic()) == ((_o).italic())))) {
295 0 : return false;
296 : }
297 0 : if ((!((index()) == ((_o).index())))) {
298 0 : return false;
299 : }
300 0 : return true;
301 : }
302 :
303 : void
304 0 : FontListEntry::Init()
305 : {
306 0 : }
307 :
308 : void
309 0 : FontListEntry::Assign(
310 : const nsString& _familyName,
311 : const nsString& _faceName,
312 : const nsCString& _filepath,
313 : const PRUint16& _weight,
314 : const PRInt16& _stretch,
315 : const PRUint8& _italic,
316 : const PRUint8& _index)
317 : {
318 0 : familyName_ = _familyName;
319 0 : faceName_ = _faceName;
320 0 : filepath_ = _filepath;
321 0 : weight_ = _weight;
322 0 : stretch_ = _stretch;
323 0 : italic_ = _italic;
324 0 : index_ = _index;
325 0 : }
326 :
327 : } // namespace dom
328 : } // namespace mozilla
|