]> git.saurik.com Git - apple/javascriptcore.git/blob - inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / inspector / scripts / tests / expected / generate-domains-with-feature-guards.json-result
1 ### Begin File: InspectorAlternateBackendDispatchers.h
2 /*
3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 University of Washington. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26 * THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
31
32 #ifndef InspectorAlternateBackendDispatchers_h
33 #define InspectorAlternateBackendDispatchers_h
34
35 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
36
37 #include "InspectorProtocolTypes.h"
38 #include <JavaScriptCore/InspectorBackendDispatcher.h>
39
40 namespace Inspector {
41
42 class AlternateBackendDispatcher {
43 public:
44 void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTF::move(dispatcher); }
45 BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
46 private:
47 RefPtr<BackendDispatcher> m_backendDispatcher;
48 };
49
50
51 #if PLATFORM(WEB_COMMANDS)
52 class AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher {
53 public:
54 virtual ~AlternateNetwork1BackendDispatcher() { }
55 virtual void loadResource(long callId) = 0;
56 };
57 #endif // PLATFORM(WEB_COMMANDS)
58
59 } // namespace Inspector
60
61 #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
62
63 #endif // !defined(InspectorAlternateBackendDispatchers_h)
64 ### End File: InspectorAlternateBackendDispatchers.h
65
66 ### Begin File: InspectorBackendCommands.js
67 /*
68 * Copyright (C) 2013 Google Inc. All rights reserved.
69 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
70 * Copyright (C) 2014 University of Washington. All rights reserved.
71 *
72 * Redistribution and use in source and binary forms, with or without
73 * modification, are permitted provided that the following conditions
74 * are met:
75 * 1. Redistributions of source code must retain the above copyright
76 * notice, this list of conditions and the following disclaimer.
77 * 2. Redistributions in binary form must reproduce the above copyright
78 * notice, this list of conditions and the following disclaimer in the
79 * documentation and/or other materials provided with the distribution.
80 *
81 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
82 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
83 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
84 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
85 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
86 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
87 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
88 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
89 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
90 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
91 * THE POSSIBILITY OF SUCH DAMAGE.
92 */
93
94 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
95 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
96
97 // Network1.
98 InspectorBackend.registerCommand("Network1.loadResource", [], []);
99 InspectorBackend.activateDomain("Network1");
100
101 // Network3.
102 InspectorBackend.registerNetwork3Dispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Network3");
103 InspectorBackend.registerEvent("Network3.resourceLoaded", []);
104 InspectorBackend.activateDomain("Network3");
105 ### End File: InspectorBackendCommands.js
106
107 ### Begin File: InspectorBackendDispatchers.h
108 /*
109 * Copyright (C) 2013 Google Inc. All rights reserved.
110 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
111 * Copyright (C) 2014 University of Washington. All rights reserved.
112 *
113 * Redistribution and use in source and binary forms, with or without
114 * modification, are permitted provided that the following conditions
115 * are met:
116 * 1. Redistributions of source code must retain the above copyright
117 * notice, this list of conditions and the following disclaimer.
118 * 2. Redistributions in binary form must reproduce the above copyright
119 * notice, this list of conditions and the following disclaimer in the
120 * documentation and/or other materials provided with the distribution.
121 *
122 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
123 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
124 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
125 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
126 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
127 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
128 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
129 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
130 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
131 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
132 * THE POSSIBILITY OF SUCH DAMAGE.
133 */
134
135 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
136 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
137
138 #ifndef InspectorBackendDispatchers_h
139 #define InspectorBackendDispatchers_h
140
141 #include "InspectorProtocolObjects.h"
142 #include <inspector/InspectorBackendDispatcher.h>
143 #include <wtf/text/WTFString.h>
144
145 namespace Inspector {
146
147 typedef String ErrorString;
148
149 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
150 #if PLATFORM(WEB_COMMANDS)
151 class AlternateNetwork1BackendDispatcher;
152 #endif // PLATFORM(WEB_COMMANDS)
153 #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
154
155 #if PLATFORM(WEB_COMMANDS)
156 class Network1BackendDispatcherHandler {
157 public:
158 virtual void loadResource(ErrorString&) = 0;
159 protected:
160 virtual ~Network1BackendDispatcherHandler();
161 };
162 #endif // PLATFORM(WEB_COMMANDS)
163
164 #if PLATFORM(WEB_COMMANDS)
165 class Network1BackendDispatcher final : public SupplementalBackendDispatcher {
166 public:
167 static Ref<Network1BackendDispatcher> create(BackendDispatcher*, Network1BackendDispatcherHandler*);
168 virtual void dispatch(long callId, const String& method, Ref<InspectorObject>&& message) override;
169 private:
170 void loadResource(long callId, const InspectorObject& message);
171 private:
172 Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*);
173 Network1BackendDispatcherHandler* m_agent;
174 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
175 public:
176 void setAlternateDispatcher(AlternateNetwork1BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
177 private:
178 AlternateNetwork1BackendDispatcher* m_alternateDispatcher;
179 #endif
180 };
181 #endif // PLATFORM(WEB_COMMANDS)
182
183 } // namespace Inspector
184
185 #endif // !defined(InspectorBackendDispatchers_h)
186 ### End File: InspectorBackendDispatchers.h
187
188 ### Begin File: InspectorBackendDispatchers.cpp
189 /*
190 * Copyright (C) 2013 Google Inc. All rights reserved.
191 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
192 * Copyright (C) 2014 University of Washington. All rights reserved.
193 *
194 * Redistribution and use in source and binary forms, with or without
195 * modification, are permitted provided that the following conditions
196 * are met:
197 * 1. Redistributions of source code must retain the above copyright
198 * notice, this list of conditions and the following disclaimer.
199 * 2. Redistributions in binary form must reproduce the above copyright
200 * notice, this list of conditions and the following disclaimer in the
201 * documentation and/or other materials provided with the distribution.
202 *
203 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
204 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
205 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
206 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
207 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
208 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
209 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
210 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
211 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
212 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
213 * THE POSSIBILITY OF SUCH DAMAGE.
214 */
215
216 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
217 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
218
219 #include "config.h"
220 #include "InspectorBackendDispatchers.h"
221
222 #include <inspector/InspectorFrontendChannel.h>
223 #include <inspector/InspectorValues.h>
224 #include <wtf/text/CString.h>
225
226 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
227 #include "InspectorAlternateBackendDispatchers.h"
228 #endif
229
230 namespace Inspector {
231
232 #if PLATFORM(WEB_COMMANDS)
233 Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { }
234 #endif // PLATFORM(WEB_COMMANDS)
235
236 #if PLATFORM(WEB_COMMANDS)
237 Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher* backendDispatcher, Network1BackendDispatcherHandler* agent)
238 {
239 return adoptRef(*new Network1BackendDispatcher(*backendDispatcher, agent));
240 }
241
242 Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
243 : SupplementalBackendDispatcher(backendDispatcher)
244 , m_agent(agent)
245 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
246 , m_alternateDispatcher(nullptr)
247 #endif
248 {
249 m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network1"), this);
250 }
251
252 void Network1BackendDispatcher::dispatch(long callId, const String& method, Ref<InspectorObject>&& message)
253 {
254 Ref<Network1BackendDispatcher> protect(*this);
255
256 if (method == "loadResource")
257 loadResource(callId, message);
258 else
259 m_backendDispatcher->reportProtocolError(&callId, BackendDispatcher::MethodNotFound, makeString('\'', "Network1", '.', method, "' was not found"));
260 }
261
262 void Network1BackendDispatcher::loadResource(long callId, const InspectorObject&)
263 {
264 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
265 if (m_alternateDispatcher) {
266 m_alternateDispatcher->loadResource(callId);
267 return;
268 }
269 #endif
270
271 ErrorString error;
272 Ref<InspectorObject> result = InspectorObject::create();
273 m_agent->loadResource(error);
274
275 m_backendDispatcher->sendResponse(callId, WTF::move(result), error);
276 }
277 #endif // PLATFORM(WEB_COMMANDS)
278
279 } // namespace Inspector
280
281 ### End File: InspectorBackendDispatchers.cpp
282
283 ### Begin File: InspectorFrontendDispatchers.h
284 /*
285 * Copyright (C) 2013 Google Inc. All rights reserved.
286 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
287 * Copyright (C) 2014 University of Washington. All rights reserved.
288 *
289 * Redistribution and use in source and binary forms, with or without
290 * modification, are permitted provided that the following conditions
291 * are met:
292 * 1. Redistributions of source code must retain the above copyright
293 * notice, this list of conditions and the following disclaimer.
294 * 2. Redistributions in binary form must reproduce the above copyright
295 * notice, this list of conditions and the following disclaimer in the
296 * documentation and/or other materials provided with the distribution.
297 *
298 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
299 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
300 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
301 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
302 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
303 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
304 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
305 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
306 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
307 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
308 * THE POSSIBILITY OF SUCH DAMAGE.
309 */
310
311 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
312 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
313
314 #ifndef InspectorFrontendDispatchers_h
315 #define InspectorFrontendDispatchers_h
316
317 #include "InspectorProtocolObjects.h"
318 #include <inspector/InspectorFrontendChannel.h>
319 #include <inspector/InspectorValues.h>
320 #include <wtf/text/WTFString.h>
321
322 namespace Inspector {
323
324
325
326 #if PLATFORM(WEB_EVENTS)
327 class Network3FrontendDispatcher {
328 public:
329 Network3FrontendDispatcher(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
330 void resourceLoaded();
331 private:
332 FrontendChannel* m_frontendChannel;
333 };
334 #endif // PLATFORM(WEB_EVENTS)
335
336 } // namespace Inspector
337
338 #endif // !defined(InspectorFrontendDispatchers_h)
339 ### End File: InspectorFrontendDispatchers.h
340
341 ### Begin File: InspectorFrontendDispatchers.cpp
342 /*
343 * Copyright (C) 2013 Google Inc. All rights reserved.
344 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
345 * Copyright (C) 2014 University of Washington. All rights reserved.
346 *
347 * Redistribution and use in source and binary forms, with or without
348 * modification, are permitted provided that the following conditions
349 * are met:
350 * 1. Redistributions of source code must retain the above copyright
351 * notice, this list of conditions and the following disclaimer.
352 * 2. Redistributions in binary form must reproduce the above copyright
353 * notice, this list of conditions and the following disclaimer in the
354 * documentation and/or other materials provided with the distribution.
355 *
356 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
357 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
358 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
359 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
360 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
361 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
362 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
363 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
364 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
365 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
366 * THE POSSIBILITY OF SUCH DAMAGE.
367 */
368
369 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
370 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
371
372 #include "config.h"
373 #include "InspectorFrontendDispatchers.h"
374
375 #include <wtf/text/CString.h>
376
377 namespace Inspector {
378
379 #if PLATFORM(WEB_EVENTS)
380 void Network3FrontendDispatcher::resourceLoaded()
381 {
382 Ref<InspectorObject> jsonMessage = InspectorObject::create();
383 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded"));
384
385 m_frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
386 }
387 #endif // PLATFORM(WEB_EVENTS)
388
389 } // namespace Inspector
390
391 ### End File: InspectorFrontendDispatchers.cpp
392
393 ### Begin File: InspectorProtocolObjects.h
394 /*
395 * Copyright (C) 2013 Google Inc. All rights reserved.
396 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
397 * Copyright (C) 2014 University of Washington. All rights reserved.
398 *
399 * Redistribution and use in source and binary forms, with or without
400 * modification, are permitted provided that the following conditions
401 * are met:
402 * 1. Redistributions of source code must retain the above copyright
403 * notice, this list of conditions and the following disclaimer.
404 * 2. Redistributions in binary form must reproduce the above copyright
405 * notice, this list of conditions and the following disclaimer in the
406 * documentation and/or other materials provided with the distribution.
407 *
408 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
409 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
410 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
411 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
412 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
413 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
414 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
415 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
416 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
417 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
418 * THE POSSIBILITY OF SUCH DAMAGE.
419 */
420
421 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
422 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
423
424 #ifndef InspectorProtocolObjects_h
425 #define InspectorProtocolObjects_h
426
427 #include <inspector/InspectorProtocolTypes.h>
428 #include <wtf/Assertions.h>
429
430 namespace Inspector {
431
432
433
434 namespace Protocol {
435
436 // Forward declarations.
437 #if PLATFORM(WEB_TYPES)
438 namespace Network2 {
439 class NetworkError;
440 } // Network2
441 #endif // PLATFORM(WEB_TYPES)
442 // End of forward declarations.
443
444
445
446
447 String getEnumConstantValue(int code);
448
449 template<typename T> String getEnumConstantValue(T enumValue)
450 {
451 return getEnumConstantValue(static_cast<int>(enumValue));
452 }
453
454 #if PLATFORM(WEB_TYPES)
455 namespace Network2 {
456 class NetworkError : public Inspector::InspectorObjectBase {
457 public:
458 enum {
459 NoFieldsSet = 0,
460 MessageSet = 1 << 0,
461 CodeSet = 1 << 1,
462 AllFieldsSet = (MessageSet | CodeSet)
463 };
464
465 template<int STATE>
466 class Builder {
467 private:
468 RefPtr<InspectorObject> m_result;
469
470 template<int STEP> Builder<STATE | STEP>& castState()
471 {
472 return *reinterpret_cast<Builder<STATE | STEP>*>(this);
473 }
474
475 Builder(Ref</*NetworkError*/InspectorObject>&& object)
476 : m_result(WTF::move(object))
477 {
478 COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
479 }
480 friend class NetworkError;
481 public:
482
483 Builder<STATE | MessageSet>& setMessage(const String& value)
484 {
485 COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
486 m_result->setString(ASCIILiteral("message"), value);
487 return castState<MessageSet>();
488 }
489
490 Builder<STATE | CodeSet>& setCode(int value)
491 {
492 COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
493 m_result->setInteger(ASCIILiteral("code"), value);
494 return castState<CodeSet>();
495 }
496
497 Ref<NetworkError> release()
498 {
499 COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
500 COMPILE_ASSERT(sizeof(NetworkError) == sizeof(InspectorObject), cannot_cast);
501
502 Ref<InspectorObject> result = m_result.releaseNonNull();
503 return WTF::move(*reinterpret_cast<Ref<NetworkError>*>(&result));
504 }
505 };
506
507 /*
508 * Synthetic constructor:
509 * Ref<NetworkError> result = NetworkError::create()
510 * .setMessage(...)
511 * .setCode(...)
512 * .release();
513 */
514 static Builder<NoFieldsSet> create()
515 {
516 return Builder<NoFieldsSet>(InspectorObject::create());
517 }
518 };
519
520 } // Network2
521 #endif // PLATFORM(WEB_TYPES)
522
523
524
525 } // namespace Protocol
526
527 } // namespace Inspector
528
529 #endif // !defined(InspectorProtocolObjects_h)
530 ### End File: InspectorProtocolObjects.h
531
532 ### Begin File: InspectorProtocolObjects.cpp
533 /*
534 * Copyright (C) 2013 Google Inc. All rights reserved.
535 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
536 * Copyright (C) 2014 University of Washington. All rights reserved.
537 *
538 * Redistribution and use in source and binary forms, with or without
539 * modification, are permitted provided that the following conditions
540 * are met:
541 * 1. Redistributions of source code must retain the above copyright
542 * notice, this list of conditions and the following disclaimer.
543 * 2. Redistributions in binary form must reproduce the above copyright
544 * notice, this list of conditions and the following disclaimer in the
545 * documentation and/or other materials provided with the distribution.
546 *
547 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
548 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
549 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
550 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
551 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
552 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
553 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
554 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
555 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
556 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
557 * THE POSSIBILITY OF SUCH DAMAGE.
558 */
559
560 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
561 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
562
563 #include "config.h"
564 #include "InspectorProtocolObjects.h"
565
566 #include <wtf/text/CString.h>
567
568 namespace Inspector {
569
570 namespace Protocol {
571
572 static const char* const enum_constant_values[] = {
573 };
574
575 String getEnumConstantValue(int code) {
576 return enum_constant_values[code];
577 }
578
579
580
581 } // namespace Protocol
582
583 } // namespace Inspector
584
585 ### End File: InspectorProtocolObjects.cpp
586
587 ### Begin File: RWIProtocolBackendDispatchers.h
588 /*
589 * Copyright (C) 2013 Google Inc. All rights reserved.
590 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
591 * Copyright (C) 2014 University of Washington. All rights reserved.
592 *
593 * Redistribution and use in source and binary forms, with or without
594 * modification, are permitted provided that the following conditions
595 * are met:
596 * 1. Redistributions of source code must retain the above copyright
597 * notice, this list of conditions and the following disclaimer.
598 * 2. Redistributions in binary form must reproduce the above copyright
599 * notice, this list of conditions and the following disclaimer in the
600 * documentation and/or other materials provided with the distribution.
601 *
602 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
603 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
604 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
605 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
606 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
607 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
608 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
609 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
610 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
611 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
612 * THE POSSIBILITY OF SUCH DAMAGE.
613 */
614
615 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
616 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
617
618 #include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
619 #include <wtf/RetainPtr.h>
620
621 @protocol RWIProtocolNetwork1DomainHandler;
622
623 namespace Inspector {
624
625
626 #if PLATFORM(WEB_COMMANDS)
627 class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher {
628 public:
629 ObjCInspectorNetwork1BackendDispatcher(id<RWIProtocolNetwork1DomainHandler> handler) { m_delegate = handler; }
630 virtual void loadResource(long callId) override;
631 private:
632 RetainPtr<id<RWIProtocolNetwork1DomainHandler>> m_delegate;
633 };
634 #endif // PLATFORM(WEB_COMMANDS)
635
636
637
638
639
640 } // namespace Inspector
641
642 ### End File: RWIProtocolBackendDispatchers.h
643
644 ### Begin File: RWIProtocolConfiguration.mm
645 /*
646 * Copyright (C) 2013 Google Inc. All rights reserved.
647 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
648 * Copyright (C) 2014 University of Washington. All rights reserved.
649 *
650 * Redistribution and use in source and binary forms, with or without
651 * modification, are permitted provided that the following conditions
652 * are met:
653 * 1. Redistributions of source code must retain the above copyright
654 * notice, this list of conditions and the following disclaimer.
655 * 2. Redistributions in binary form must reproduce the above copyright
656 * notice, this list of conditions and the following disclaimer in the
657 * documentation and/or other materials provided with the distribution.
658 *
659 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
660 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
661 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
662 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
663 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
664 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
665 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
666 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
667 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
668 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
669 * THE POSSIBILITY OF SUCH DAMAGE.
670 */
671
672 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
673 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
674
675 #import "config.h"
676 #import "RWIProtocolConfiguration.h"
677
678 #import "RWIProtocolInternal.h"
679 #import "RWIProtocolBackendDispatchers.h"
680 #import <JavaScriptCore/AlternateDispatchableAgent.h>
681 #import <JavaScriptCore/AugmentableInspectorController.h>
682 #import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
683 #import <JavaScriptCore/InspectorBackendDispatchers.h>
684
685 using namespace Inspector;
686
687 @implementation RWIProtocolConfiguration
688 {
689 AugmentableInspectorController* _controller;
690 id<RWIProtocolNetwork1DomainHandler> _network1Handler;
691 RWIProtocolNetwork3DomainEventDispatcher *_network3EventDispatcher;
692 }
693
694 - (instancetype)initWithController:(AugmentableInspectorController*)controller
695 {
696 self = [super init];
697 if (!self)
698 return nil;
699 ASSERT(controller);
700 _controller = controller;
701 return self;
702 }
703
704 - (void)dealloc
705 {
706 [_network1Handler release];
707 [_network3EventDispatcher release];
708 [super dealloc];
709 }
710
711 - (void)setNetwork1Handler:(id<RWIProtocolNetwork1DomainHandler>)handler
712 {
713 if (handler == _network1Handler)
714 return;
715
716 [_network1Handler release];
717 _network1Handler = [handler retain];
718
719 auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler);
720 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), WTF::move(alternateDispatcher));
721 _controller->appendExtraAgent(WTF::move(alternateAgent));
722 }
723
724 - (id<RWIProtocolNetwork1DomainHandler>)network1Handler
725 {
726 return _network1Handler;
727 }
728
729 - (RWIProtocolNetwork3DomainEventDispatcher *)network3EventDispatcher
730 {
731 if (!_network3EventDispatcher)
732 _network3EventDispatcher = [[RWIProtocolNetwork3DomainEventDispatcher alloc] initWithController:_controller];
733 return _network3EventDispatcher;
734 }
735
736 @end
737
738
739 ### End File: RWIProtocolConfiguration.mm
740
741 ### Begin File: RWIProtocolConfiguration.h
742 /*
743 * Copyright (C) 2013 Google Inc. All rights reserved.
744 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
745 * Copyright (C) 2014 University of Washington. All rights reserved.
746 *
747 * Redistribution and use in source and binary forms, with or without
748 * modification, are permitted provided that the following conditions
749 * are met:
750 * 1. Redistributions of source code must retain the above copyright
751 * notice, this list of conditions and the following disclaimer.
752 * 2. Redistributions in binary form must reproduce the above copyright
753 * notice, this list of conditions and the following disclaimer in the
754 * documentation and/or other materials provided with the distribution.
755 *
756 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
757 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
758 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
759 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
760 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
761 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
762 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
763 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
764 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
765 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
766 * THE POSSIBILITY OF SUCH DAMAGE.
767 */
768
769 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
770 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
771
772 #import "RWIProtocol.h"
773
774 __attribute__((visibility ("default")))
775 @interface RWIProtocolConfiguration : NSObject
776 @property (nonatomic, retain, setter=setNetwork1Handler:) id<RWIProtocolNetwork1DomainHandler> network1Handler;
777 @property (nonatomic, readonly) RWIProtocolNetwork3DomainEventDispatcher *network3EventDispatcher;
778 @end
779
780
781 ### End File: RWIProtocolConfiguration.h
782
783 ### Begin File: RWIProtocolBackendDispatchers.mm
784 /*
785 * Copyright (C) 2013 Google Inc. All rights reserved.
786 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
787 * Copyright (C) 2014 University of Washington. All rights reserved.
788 *
789 * Redistribution and use in source and binary forms, with or without
790 * modification, are permitted provided that the following conditions
791 * are met:
792 * 1. Redistributions of source code must retain the above copyright
793 * notice, this list of conditions and the following disclaimer.
794 * 2. Redistributions in binary form must reproduce the above copyright
795 * notice, this list of conditions and the following disclaimer in the
796 * documentation and/or other materials provided with the distribution.
797 *
798 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
799 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
800 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
801 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
802 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
803 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
804 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
805 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
806 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
807 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
808 * THE POSSIBILITY OF SUCH DAMAGE.
809 */
810
811 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
812 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
813
814 #import "config.h"
815 #import "RWIProtocolBackendDispatchers.h"
816
817 #include "RWIProtocolInternal.h"
818 #include "RWIProtocolEnumConversionHelpers.h"
819 #include <JavaScriptCore/InspectorFrontendChannel.h>
820 #include <JavaScriptCore/InspectorValues.h>
821
822 namespace Inspector {
823
824 #if PLATFORM(WEB_COMMANDS)
825 void ObjCInspectorNetwork1BackendDispatcher::loadResource(long callId)
826 {
827 id errorCallback = ^(NSString *error) {
828 backendDispatcher()->sendResponse(callId, InspectorObject::create(), error);
829 };
830
831 id successCallback = ^{
832 backendDispatcher()->sendResponse(callId, InspectorObject::create(), String());
833 };
834
835 [m_delegate loadResourceWithErrorCallback:errorCallback successCallback:successCallback];
836 }
837
838 #endif // PLATFORM(WEB_COMMANDS)
839
840
841
842
843
844 } // namespace Inspector
845
846 ### End File: RWIProtocolBackendDispatchers.mm
847
848 ### Begin File: RWIProtocolEnumConversionHelpers.h
849 /*
850 * Copyright (C) 2013 Google Inc. All rights reserved.
851 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
852 * Copyright (C) 2014 University of Washington. All rights reserved.
853 *
854 * Redistribution and use in source and binary forms, with or without
855 * modification, are permitted provided that the following conditions
856 * are met:
857 * 1. Redistributions of source code must retain the above copyright
858 * notice, this list of conditions and the following disclaimer.
859 * 2. Redistributions in binary form must reproduce the above copyright
860 * notice, this list of conditions and the following disclaimer in the
861 * documentation and/or other materials provided with the distribution.
862 *
863 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
864 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
865 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
866 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
867 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
868 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
869 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
870 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
871 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
872 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
873 * THE POSSIBILITY OF SUCH DAMAGE.
874 */
875
876 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
877 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
878
879 #import "RWIProtocolArrayConversionHelpers.h"
880
881 namespace Inspector {
882
883 template<typename ObjCEnumType>
884 ObjCEnumType fromProtocolString(const String& value);
885
886
887
888
889
890
891
892 } // namespace Inspector
893
894 ### End File: RWIProtocolEnumConversionHelpers.h
895
896 ### Begin File: RWIProtocolEventDispatchers.mm
897 /*
898 * Copyright (C) 2013 Google Inc. All rights reserved.
899 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
900 * Copyright (C) 2014 University of Washington. All rights reserved.
901 *
902 * Redistribution and use in source and binary forms, with or without
903 * modification, are permitted provided that the following conditions
904 * are met:
905 * 1. Redistributions of source code must retain the above copyright
906 * notice, this list of conditions and the following disclaimer.
907 * 2. Redistributions in binary form must reproduce the above copyright
908 * notice, this list of conditions and the following disclaimer in the
909 * documentation and/or other materials provided with the distribution.
910 *
911 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
912 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
913 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
914 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
915 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
916 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
917 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
918 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
919 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
920 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
921 * THE POSSIBILITY OF SUCH DAMAGE.
922 */
923
924 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
925 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
926
927 #import "config.h"
928 #import "RWIProtocolInternal.h"
929
930 #import "RWIProtocolEnumConversionHelpers.h"
931 #import <JavaScriptCore/InspectorFrontendChannel.h>
932 #import <JavaScriptCore/InspectorValues.h>
933
934 using namespace Inspector;
935
936
937
938
939
940 @implementation RWIProtocolNetwork3DomainEventDispatcher
941 {
942 AugmentableInspectorController* _controller;
943 }
944
945 - (instancetype)initWithController:(AugmentableInspectorController*)controller;
946 {
947 self = [super init];
948 if (!self)
949 return nil;
950 ASSERT(controller);
951 _controller = controller;
952 return self;
953 }
954
955 - (void)resourceLoaded
956 {
957 FrontendChannel* frontendChannel = _controller->frontendChannel();
958 if (!frontendChannel)
959 return;
960
961 Ref<InspectorObject> jsonMessage = InspectorObject::create();
962 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded"));
963 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
964 }
965
966 @end
967
968
969 ### End File: RWIProtocolEventDispatchers.mm
970
971 ### Begin File: RWIProtocol.h
972 /*
973 * Copyright (C) 2013 Google Inc. All rights reserved.
974 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
975 * Copyright (C) 2014 University of Washington. All rights reserved.
976 *
977 * Redistribution and use in source and binary forms, with or without
978 * modification, are permitted provided that the following conditions
979 * are met:
980 * 1. Redistributions of source code must retain the above copyright
981 * notice, this list of conditions and the following disclaimer.
982 * 2. Redistributions in binary form must reproduce the above copyright
983 * notice, this list of conditions and the following disclaimer in the
984 * documentation and/or other materials provided with the distribution.
985 *
986 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
987 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
988 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
989 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
990 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
991 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
992 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
993 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
994 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
995 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
996 * THE POSSIBILITY OF SUCH DAMAGE.
997 */
998
999 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
1000 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1001
1002 #import <Foundation/Foundation.h>
1003
1004 #import <WebInspector/RWIProtocolJSONObject.h>
1005
1006
1007 @class RWIProtocolNetwork2NetworkError;
1008
1009
1010
1011
1012 __attribute__((visibility ("default")))
1013 @interface RWIProtocolNetwork2NetworkError : RWIProtocolJSONObject
1014 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
1015 /* required */ @property (nonatomic, copy) NSString *message;
1016 /* required */ @property (nonatomic, assign) int code;
1017 @end
1018
1019 @protocol RWIProtocolNetwork1DomainHandler <NSObject>
1020 @required
1021 - (void)loadResourceWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
1022 @end
1023
1024 __attribute__((visibility ("default")))
1025 @interface RWIProtocolNetwork3DomainEventDispatcher : NSObject
1026 - (void)resourceLoaded;
1027 @end
1028
1029
1030 ### End File: RWIProtocol.h
1031
1032 ### Begin File: RWIProtocolTypes.mm
1033 /*
1034 * Copyright (C) 2013 Google Inc. All rights reserved.
1035 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
1036 * Copyright (C) 2014 University of Washington. All rights reserved.
1037 *
1038 * Redistribution and use in source and binary forms, with or without
1039 * modification, are permitted provided that the following conditions
1040 * are met:
1041 * 1. Redistributions of source code must retain the above copyright
1042 * notice, this list of conditions and the following disclaimer.
1043 * 2. Redistributions in binary form must reproduce the above copyright
1044 * notice, this list of conditions and the following disclaimer in the
1045 * documentation and/or other materials provided with the distribution.
1046 *
1047 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1048 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1049 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1050 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1051 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1052 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1053 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1054 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1055 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1056 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1057 * THE POSSIBILITY OF SUCH DAMAGE.
1058 */
1059
1060 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
1061 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1062
1063 #import "config.h"
1064 #import "RWIProtocolInternal.h"
1065
1066 #import "RWIProtocolEnumConversionHelpers.h"
1067 #import <JavaScriptCore/InspectorValues.h>
1068 #import <wtf/Assertions.h>
1069
1070 using namespace Inspector;
1071
1072
1073
1074
1075 @implementation RWIProtocolNetwork2NetworkError
1076
1077 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
1078 {
1079 self = [super init];
1080 if (!self)
1081 return nil;
1082
1083 THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
1084
1085 self.message = message;
1086 self.code = code;
1087
1088 return self;
1089 }
1090
1091 - (void)setMessage:(NSString *)message
1092 {
1093 [super setString:message forKey:@"message"];
1094 }
1095
1096 - (NSString *)message
1097 {
1098 return [super stringForKey:@"message"];
1099 }
1100
1101 - (void)setCode:(int)code
1102 {
1103 [super setInteger:code forKey:@"code"];
1104 }
1105
1106 - (int)code
1107 {
1108 return [super integerForKey:@"code"];
1109 }
1110
1111 @end
1112
1113
1114
1115
1116 ### End File: RWIProtocolTypes.mm
1117
1118 ### Begin File: RWIProtocolInternal.h
1119 /*
1120 * Copyright (C) 2013 Google Inc. All rights reserved.
1121 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
1122 * Copyright (C) 2014 University of Washington. All rights reserved.
1123 *
1124 * Redistribution and use in source and binary forms, with or without
1125 * modification, are permitted provided that the following conditions
1126 * are met:
1127 * 1. Redistributions of source code must retain the above copyright
1128 * notice, this list of conditions and the following disclaimer.
1129 * 2. Redistributions in binary form must reproduce the above copyright
1130 * notice, this list of conditions and the following disclaimer in the
1131 * documentation and/or other materials provided with the distribution.
1132 *
1133 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1134 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1135 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1136 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1137 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1138 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1139 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1140 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1141 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1142 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1143 * THE POSSIBILITY OF SUCH DAMAGE.
1144 */
1145
1146 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
1147 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1148
1149 #import "RWIProtocol.h"
1150 #import "RWIProtocolJSONObjectInternal.h"
1151 #import <JavaScriptCore/AugmentableInspectorController.h>
1152 #import <JavaScriptCore/InspectorValues.h>
1153
1154 @interface RWIProtocolNetwork3DomainEventDispatcher (Private)
1155 - (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller;
1156 @end
1157
1158
1159 ### End File: RWIProtocolInternal.h