1 ### Begin File: InspectorAlternateBackendDispatchers.h
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.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
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.
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.
29 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
32 #ifndef InspectorAlternateBackendDispatchers_h
33 #define InspectorAlternateBackendDispatchers_h
35 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
37 #include "InspectorProtocolTypes.h"
38 #include <JavaScriptCore/InspectorBackendDispatcher.h>
42 class AlternateBackendDispatcher {
44 void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTF::move(dispatcher); }
45 BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
47 RefPtr<BackendDispatcher> m_backendDispatcher;
51 class AlternateCommandDomainBackendDispatcher : public AlternateBackendDispatcher {
53 virtual ~AlternateCommandDomainBackendDispatcher() { }
54 virtual void commandWithEnumReturnValue(long callId) = 0;
57 } // namespace Inspector
59 #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
61 #endif // !defined(InspectorAlternateBackendDispatchers_h)
62 ### End File: InspectorAlternateBackendDispatchers.h
64 ### Begin File: InspectorBackendCommands.js
66 * Copyright (C) 2013 Google Inc. All rights reserved.
67 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
68 * Copyright (C) 2014 University of Washington. All rights reserved.
70 * Redistribution and use in source and binary forms, with or without
71 * modification, are permitted provided that the following conditions
73 * 1. Redistributions of source code must retain the above copyright
74 * notice, this list of conditions and the following disclaimer.
75 * 2. Redistributions in binary form must reproduce the above copyright
76 * notice, this list of conditions and the following disclaimer in the
77 * documentation and/or other materials provided with the distribution.
79 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
80 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
81 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
82 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
83 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
84 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
85 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
86 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
87 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
88 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
89 * THE POSSIBILITY OF SUCH DAMAGE.
92 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
93 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
96 InspectorBackend.registerEnum("TypeDomain.TypeDomainEnum", {Shared: "shared", Red: "red", Green: "green", Blue: "blue"});
99 InspectorBackend.registerCommand("CommandDomain.commandWithEnumReturnValue", [], ["returnValue"]);
100 InspectorBackend.activateDomain("CommandDomain");
103 InspectorBackend.registerEventDomainDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "EventDomain");
104 InspectorBackend.registerEnum("EventDomain.EventWithEnumParameterParameter", {Shared: "shared", Black: "black", White: "white"});
105 InspectorBackend.registerEvent("EventDomain.eventWithEnumParameter", ["parameter"]);
106 InspectorBackend.activateDomain("EventDomain");
107 ### End File: InspectorBackendCommands.js
109 ### Begin File: InspectorBackendDispatchers.h
111 * Copyright (C) 2013 Google Inc. All rights reserved.
112 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
113 * Copyright (C) 2014 University of Washington. All rights reserved.
115 * Redistribution and use in source and binary forms, with or without
116 * modification, are permitted provided that the following conditions
118 * 1. Redistributions of source code must retain the above copyright
119 * notice, this list of conditions and the following disclaimer.
120 * 2. Redistributions in binary form must reproduce the above copyright
121 * notice, this list of conditions and the following disclaimer in the
122 * documentation and/or other materials provided with the distribution.
124 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
125 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
126 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
127 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
128 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
129 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
130 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
131 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
132 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
133 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
134 * THE POSSIBILITY OF SUCH DAMAGE.
137 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
138 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
140 #ifndef InspectorBackendDispatchers_h
141 #define InspectorBackendDispatchers_h
143 #include "InspectorProtocolObjects.h"
144 #include <inspector/InspectorBackendDispatcher.h>
145 #include <wtf/text/WTFString.h>
147 namespace Inspector {
149 typedef String ErrorString;
151 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
152 class AlternateCommandDomainBackendDispatcher;
153 #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
155 class CommandDomainBackendDispatcherHandler {
157 // Named after parameter 'returnValue' while generating command/event commandWithEnumReturnValue.
158 enum class ReturnValue {
163 }; // enum class ReturnValue
164 virtual void commandWithEnumReturnValue(ErrorString&, CommandDomainBackendDispatcherHandler::ReturnValue* out_returnValue) = 0;
166 virtual ~CommandDomainBackendDispatcherHandler();
169 class CommandDomainBackendDispatcher final : public SupplementalBackendDispatcher {
171 static Ref<CommandDomainBackendDispatcher> create(BackendDispatcher*, CommandDomainBackendDispatcherHandler*);
172 virtual void dispatch(long callId, const String& method, Ref<InspectorObject>&& message) override;
174 void commandWithEnumReturnValue(long callId, const InspectorObject& message);
176 CommandDomainBackendDispatcher(BackendDispatcher&, CommandDomainBackendDispatcherHandler*);
177 CommandDomainBackendDispatcherHandler* m_agent;
178 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
180 void setAlternateDispatcher(AlternateCommandDomainBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
182 AlternateCommandDomainBackendDispatcher* m_alternateDispatcher;
186 } // namespace Inspector
188 #endif // !defined(InspectorBackendDispatchers_h)
189 ### End File: InspectorBackendDispatchers.h
191 ### Begin File: InspectorBackendDispatchers.cpp
193 * Copyright (C) 2013 Google Inc. All rights reserved.
194 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
195 * Copyright (C) 2014 University of Washington. All rights reserved.
197 * Redistribution and use in source and binary forms, with or without
198 * modification, are permitted provided that the following conditions
200 * 1. Redistributions of source code must retain the above copyright
201 * notice, this list of conditions and the following disclaimer.
202 * 2. Redistributions in binary form must reproduce the above copyright
203 * notice, this list of conditions and the following disclaimer in the
204 * documentation and/or other materials provided with the distribution.
206 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
207 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
208 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
209 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
210 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
211 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
212 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
213 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
214 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
215 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
216 * THE POSSIBILITY OF SUCH DAMAGE.
219 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
220 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
223 #include "InspectorBackendDispatchers.h"
225 #include <inspector/InspectorFrontendChannel.h>
226 #include <inspector/InspectorValues.h>
227 #include <wtf/text/CString.h>
229 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
230 #include "InspectorAlternateBackendDispatchers.h"
233 namespace Inspector {
235 CommandDomainBackendDispatcherHandler::~CommandDomainBackendDispatcherHandler() { }
237 Ref<CommandDomainBackendDispatcher> CommandDomainBackendDispatcher::create(BackendDispatcher* backendDispatcher, CommandDomainBackendDispatcherHandler* agent)
239 return adoptRef(*new CommandDomainBackendDispatcher(*backendDispatcher, agent));
242 CommandDomainBackendDispatcher::CommandDomainBackendDispatcher(BackendDispatcher& backendDispatcher, CommandDomainBackendDispatcherHandler* agent)
243 : SupplementalBackendDispatcher(backendDispatcher)
245 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
246 , m_alternateDispatcher(nullptr)
249 m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("CommandDomain"), this);
252 void CommandDomainBackendDispatcher::dispatch(long callId, const String& method, Ref<InspectorObject>&& message)
254 Ref<CommandDomainBackendDispatcher> protect(*this);
256 if (method == "commandWithEnumReturnValue")
257 commandWithEnumReturnValue(callId, message);
259 m_backendDispatcher->reportProtocolError(&callId, BackendDispatcher::MethodNotFound, makeString('\'', "CommandDomain", '.', method, "' was not found"));
262 void CommandDomainBackendDispatcher::commandWithEnumReturnValue(long callId, const InspectorObject&)
264 #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
265 if (m_alternateDispatcher) {
266 m_alternateDispatcher->commandWithEnumReturnValue(callId);
272 Ref<InspectorObject> result = InspectorObject::create();
273 CommandDomainBackendDispatcherHandler::ReturnValue out_returnValue;
274 m_agent->commandWithEnumReturnValue(error, &out_returnValue);
277 result->setString(ASCIILiteral("returnValue"), Inspector::Protocol::getEnumConstantValue(out_returnValue));
279 m_backendDispatcher->sendResponse(callId, WTF::move(result), error);
282 } // namespace Inspector
284 ### End File: InspectorBackendDispatchers.cpp
286 ### Begin File: InspectorFrontendDispatchers.h
288 * Copyright (C) 2013 Google Inc. All rights reserved.
289 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
290 * Copyright (C) 2014 University of Washington. All rights reserved.
292 * Redistribution and use in source and binary forms, with or without
293 * modification, are permitted provided that the following conditions
295 * 1. Redistributions of source code must retain the above copyright
296 * notice, this list of conditions and the following disclaimer.
297 * 2. Redistributions in binary form must reproduce the above copyright
298 * notice, this list of conditions and the following disclaimer in the
299 * documentation and/or other materials provided with the distribution.
301 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
302 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
303 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
304 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
305 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
306 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
307 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
308 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
309 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
310 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
311 * THE POSSIBILITY OF SUCH DAMAGE.
314 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
315 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
317 #ifndef InspectorFrontendDispatchers_h
318 #define InspectorFrontendDispatchers_h
320 #include "InspectorProtocolObjects.h"
321 #include <inspector/InspectorFrontendChannel.h>
322 #include <inspector/InspectorValues.h>
323 #include <wtf/text/WTFString.h>
325 namespace Inspector {
329 class EventDomainFrontendDispatcher {
331 EventDomainFrontendDispatcher(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
332 // Named after parameter 'parameter' while generating command/event eventWithEnumParameter.
333 enum class Parameter {
337 }; // enum class Parameter
338 void eventWithEnumParameter(Parameter parameter);
340 FrontendChannel* m_frontendChannel;
343 } // namespace Inspector
345 #endif // !defined(InspectorFrontendDispatchers_h)
346 ### End File: InspectorFrontendDispatchers.h
348 ### Begin File: InspectorFrontendDispatchers.cpp
350 * Copyright (C) 2013 Google Inc. All rights reserved.
351 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
352 * Copyright (C) 2014 University of Washington. All rights reserved.
354 * Redistribution and use in source and binary forms, with or without
355 * modification, are permitted provided that the following conditions
357 * 1. Redistributions of source code must retain the above copyright
358 * notice, this list of conditions and the following disclaimer.
359 * 2. Redistributions in binary form must reproduce the above copyright
360 * notice, this list of conditions and the following disclaimer in the
361 * documentation and/or other materials provided with the distribution.
363 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
364 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
365 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
366 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
367 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
368 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
369 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
370 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
371 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
372 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
373 * THE POSSIBILITY OF SUCH DAMAGE.
376 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
377 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
380 #include "InspectorFrontendDispatchers.h"
382 #include <wtf/text/CString.h>
384 namespace Inspector {
386 void EventDomainFrontendDispatcher::eventWithEnumParameter(Parameter parameter)
388 Ref<InspectorObject> jsonMessage = InspectorObject::create();
389 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter"));
390 Ref<InspectorObject> paramsObject = InspectorObject::create();
391 paramsObject->setString(ASCIILiteral("parameter"), Inspector::Protocol::getEnumConstantValue(parameter));
392 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject));
394 m_frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
397 } // namespace Inspector
399 ### End File: InspectorFrontendDispatchers.cpp
401 ### Begin File: InspectorProtocolObjects.h
403 * Copyright (C) 2013 Google Inc. All rights reserved.
404 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
405 * Copyright (C) 2014 University of Washington. All rights reserved.
407 * Redistribution and use in source and binary forms, with or without
408 * modification, are permitted provided that the following conditions
410 * 1. Redistributions of source code must retain the above copyright
411 * notice, this list of conditions and the following disclaimer.
412 * 2. Redistributions in binary form must reproduce the above copyright
413 * notice, this list of conditions and the following disclaimer in the
414 * documentation and/or other materials provided with the distribution.
416 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
417 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
418 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
419 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
420 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
421 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
422 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
423 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
424 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
425 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
426 * THE POSSIBILITY OF SUCH DAMAGE.
429 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
430 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
432 #ifndef InspectorProtocolObjects_h
433 #define InspectorProtocolObjects_h
435 #include <inspector/InspectorProtocolTypes.h>
436 #include <wtf/Assertions.h>
438 namespace Inspector {
444 // Forward declarations.
445 namespace TypeDomain {
446 enum class TypeDomainEnum;
448 // End of forward declarations.
453 String getEnumConstantValue(int code);
455 template<typename T> String getEnumConstantValue(T enumValue)
457 return getEnumConstantValue(static_cast<int>(enumValue));
460 namespace TypeDomain {
462 enum class TypeDomainEnum {
467 }; // enum class TypeDomainEnum
472 } // namespace Protocol
474 } // namespace Inspector
476 #endif // !defined(InspectorProtocolObjects_h)
477 ### End File: InspectorProtocolObjects.h
479 ### Begin File: InspectorProtocolObjects.cpp
481 * Copyright (C) 2013 Google Inc. All rights reserved.
482 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
483 * Copyright (C) 2014 University of Washington. All rights reserved.
485 * Redistribution and use in source and binary forms, with or without
486 * modification, are permitted provided that the following conditions
488 * 1. Redistributions of source code must retain the above copyright
489 * notice, this list of conditions and the following disclaimer.
490 * 2. Redistributions in binary form must reproduce the above copyright
491 * notice, this list of conditions and the following disclaimer in the
492 * documentation and/or other materials provided with the distribution.
494 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
495 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
496 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
497 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
498 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
499 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
500 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
501 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
502 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
503 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
504 * THE POSSIBILITY OF SUCH DAMAGE.
507 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
508 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
511 #include "InspectorProtocolObjects.h"
513 #include <wtf/text/CString.h>
515 namespace Inspector {
519 static const char* const enum_constant_values[] = {
531 String getEnumConstantValue(int code) {
532 return enum_constant_values[code];
537 } // namespace Protocol
539 } // namespace Inspector
541 ### End File: InspectorProtocolObjects.cpp
543 ### Begin File: RWIProtocolBackendDispatchers.h
545 * Copyright (C) 2013 Google Inc. All rights reserved.
546 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
547 * Copyright (C) 2014 University of Washington. All rights reserved.
549 * Redistribution and use in source and binary forms, with or without
550 * modification, are permitted provided that the following conditions
552 * 1. Redistributions of source code must retain the above copyright
553 * notice, this list of conditions and the following disclaimer.
554 * 2. Redistributions in binary form must reproduce the above copyright
555 * notice, this list of conditions and the following disclaimer in the
556 * documentation and/or other materials provided with the distribution.
558 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
559 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
560 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
561 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
562 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
563 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
564 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
565 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
566 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
567 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
568 * THE POSSIBILITY OF SUCH DAMAGE.
571 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
572 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
574 #include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
575 #include <wtf/RetainPtr.h>
577 @protocol RWIProtocolCommandDomainDomainHandler;
579 namespace Inspector {
584 class ObjCInspectorCommandDomainBackendDispatcher final : public AlternateCommandDomainBackendDispatcher {
586 ObjCInspectorCommandDomainBackendDispatcher(id<RWIProtocolCommandDomainDomainHandler> handler) { m_delegate = handler; }
587 virtual void commandWithEnumReturnValue(long callId) override;
589 RetainPtr<id<RWIProtocolCommandDomainDomainHandler>> m_delegate;
594 } // namespace Inspector
596 ### End File: RWIProtocolBackendDispatchers.h
598 ### Begin File: RWIProtocolConfiguration.mm
600 * Copyright (C) 2013 Google Inc. All rights reserved.
601 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
602 * Copyright (C) 2014 University of Washington. All rights reserved.
604 * Redistribution and use in source and binary forms, with or without
605 * modification, are permitted provided that the following conditions
607 * 1. Redistributions of source code must retain the above copyright
608 * notice, this list of conditions and the following disclaimer.
609 * 2. Redistributions in binary form must reproduce the above copyright
610 * notice, this list of conditions and the following disclaimer in the
611 * documentation and/or other materials provided with the distribution.
613 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
614 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
615 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
616 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
617 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
618 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
619 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
620 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
621 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
622 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
623 * THE POSSIBILITY OF SUCH DAMAGE.
626 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
627 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
630 #import "RWIProtocolConfiguration.h"
632 #import "RWIProtocolInternal.h"
633 #import "RWIProtocolBackendDispatchers.h"
634 #import <JavaScriptCore/AlternateDispatchableAgent.h>
635 #import <JavaScriptCore/AugmentableInspectorController.h>
636 #import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
637 #import <JavaScriptCore/InspectorBackendDispatchers.h>
639 using namespace Inspector;
641 @implementation RWIProtocolConfiguration
643 AugmentableInspectorController* _controller;
644 id<RWIProtocolCommandDomainDomainHandler> _commandDomainHandler;
645 RWIProtocolEventDomainDomainEventDispatcher *_eventDomainEventDispatcher;
648 - (instancetype)initWithController:(AugmentableInspectorController*)controller
654 _controller = controller;
660 [_commandDomainHandler release];
661 [_eventDomainEventDispatcher release];
665 - (void)setCommandDomainHandler:(id<RWIProtocolCommandDomainDomainHandler>)handler
667 if (handler == _commandDomainHandler)
670 [_commandDomainHandler release];
671 _commandDomainHandler = [handler retain];
673 auto alternateDispatcher = std::make_unique<ObjCInspectorCommandDomainBackendDispatcher>(handler);
674 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<CommandDomainBackendDispatcher, AlternateCommandDomainBackendDispatcher>>(ASCIILiteral("CommandDomain"), WTF::move(alternateDispatcher));
675 _controller->appendExtraAgent(WTF::move(alternateAgent));
678 - (id<RWIProtocolCommandDomainDomainHandler>)commandDomainHandler
680 return _commandDomainHandler;
683 - (RWIProtocolEventDomainDomainEventDispatcher *)eventDomainEventDispatcher
685 if (!_eventDomainEventDispatcher)
686 _eventDomainEventDispatcher = [[RWIProtocolEventDomainDomainEventDispatcher alloc] initWithController:_controller];
687 return _eventDomainEventDispatcher;
693 ### End File: RWIProtocolConfiguration.mm
695 ### Begin File: RWIProtocolConfiguration.h
697 * Copyright (C) 2013 Google Inc. All rights reserved.
698 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
699 * Copyright (C) 2014 University of Washington. All rights reserved.
701 * Redistribution and use in source and binary forms, with or without
702 * modification, are permitted provided that the following conditions
704 * 1. Redistributions of source code must retain the above copyright
705 * notice, this list of conditions and the following disclaimer.
706 * 2. Redistributions in binary form must reproduce the above copyright
707 * notice, this list of conditions and the following disclaimer in the
708 * documentation and/or other materials provided with the distribution.
710 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
711 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
712 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
713 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
714 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
715 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
716 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
717 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
718 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
719 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
720 * THE POSSIBILITY OF SUCH DAMAGE.
723 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
724 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
726 #import "RWIProtocol.h"
728 __attribute__((visibility ("default")))
729 @interface RWIProtocolConfiguration : NSObject
730 @property (nonatomic, retain, setter=setCommandDomainHandler:) id<RWIProtocolCommandDomainDomainHandler> commandDomainHandler;
731 @property (nonatomic, readonly) RWIProtocolEventDomainDomainEventDispatcher *eventDomainEventDispatcher;
735 ### End File: RWIProtocolConfiguration.h
737 ### Begin File: RWIProtocolBackendDispatchers.mm
739 * Copyright (C) 2013 Google Inc. All rights reserved.
740 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
741 * Copyright (C) 2014 University of Washington. All rights reserved.
743 * Redistribution and use in source and binary forms, with or without
744 * modification, are permitted provided that the following conditions
746 * 1. Redistributions of source code must retain the above copyright
747 * notice, this list of conditions and the following disclaimer.
748 * 2. Redistributions in binary form must reproduce the above copyright
749 * notice, this list of conditions and the following disclaimer in the
750 * documentation and/or other materials provided with the distribution.
752 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
753 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
754 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
755 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
756 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
757 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
758 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
759 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
760 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
761 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
762 * THE POSSIBILITY OF SUCH DAMAGE.
765 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
766 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
769 #import "RWIProtocolBackendDispatchers.h"
771 #include "RWIProtocolInternal.h"
772 #include "RWIProtocolEnumConversionHelpers.h"
773 #include <JavaScriptCore/InspectorFrontendChannel.h>
774 #include <JavaScriptCore/InspectorValues.h>
776 namespace Inspector {
780 void ObjCInspectorCommandDomainBackendDispatcher::commandWithEnumReturnValue(long callId)
782 id errorCallback = ^(NSString *error) {
783 backendDispatcher()->sendResponse(callId, InspectorObject::create(), error);
786 id successCallback = ^(RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue) {
787 Ref<InspectorObject> resultObject = InspectorObject::create();
788 resultObject->setString(ASCIILiteral("returnValue"), toProtocolString(returnValue));
789 backendDispatcher()->sendResponse(callId, WTF::move(resultObject), String());
792 [m_delegate commandWithEnumReturnValueWithErrorCallback:errorCallback successCallback:successCallback];
798 } // namespace Inspector
800 ### End File: RWIProtocolBackendDispatchers.mm
802 ### Begin File: RWIProtocolEnumConversionHelpers.h
804 * Copyright (C) 2013 Google Inc. All rights reserved.
805 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
806 * Copyright (C) 2014 University of Washington. All rights reserved.
808 * Redistribution and use in source and binary forms, with or without
809 * modification, are permitted provided that the following conditions
811 * 1. Redistributions of source code must retain the above copyright
812 * notice, this list of conditions and the following disclaimer.
813 * 2. Redistributions in binary form must reproduce the above copyright
814 * notice, this list of conditions and the following disclaimer in the
815 * documentation and/or other materials provided with the distribution.
817 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
818 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
819 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
820 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
821 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
822 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
823 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
824 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
825 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
826 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
827 * THE POSSIBILITY OF SUCH DAMAGE.
830 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
831 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
833 #import "RWIProtocolArrayConversionHelpers.h"
835 namespace Inspector {
837 template<typename ObjCEnumType>
838 ObjCEnumType fromProtocolString(const String& value);
841 inline String toProtocolString(RWIProtocolTypeDomainEnum value)
844 case RWIProtocolTypeDomainEnumShared:
845 return ASCIILiteral("shared");
846 case RWIProtocolTypeDomainEnumRed:
847 return ASCIILiteral("red");
848 case RWIProtocolTypeDomainEnumGreen:
849 return ASCIILiteral("green");
850 case RWIProtocolTypeDomainEnumBlue:
851 return ASCIILiteral("blue");
856 inline RWIProtocolTypeDomainEnum fromProtocolString(const String& value)
858 if (value == "shared")
859 return RWIProtocolTypeDomainEnumShared;
861 return RWIProtocolTypeDomainEnumRed;
862 if (value == "green")
863 return RWIProtocolTypeDomainEnumGreen;
865 return RWIProtocolTypeDomainEnumBlue;
866 ASSERT_NOT_REACHED();
867 return RWIProtocolTypeDomainEnumShared;
871 inline String toProtocolString(RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue value)
874 case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared:
875 return ASCIILiteral("shared");
876 case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan:
877 return ASCIILiteral("cyan");
878 case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta:
879 return ASCIILiteral("magenta");
880 case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow:
881 return ASCIILiteral("yellow");
886 inline RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue fromProtocolString(const String& value)
888 if (value == "shared")
889 return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared;
891 return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan;
892 if (value == "magenta")
893 return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta;
894 if (value == "yellow")
895 return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow;
896 ASSERT_NOT_REACHED();
897 return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared;
901 inline String toProtocolString(RWIProtocolEventDomainEventWithEnumParameterParameter value)
904 case RWIProtocolEventDomainEventWithEnumParameterParameterShared:
905 return ASCIILiteral("shared");
906 case RWIProtocolEventDomainEventWithEnumParameterParameterBlack:
907 return ASCIILiteral("black");
908 case RWIProtocolEventDomainEventWithEnumParameterParameterWhite:
909 return ASCIILiteral("white");
914 inline RWIProtocolEventDomainEventWithEnumParameterParameter fromProtocolString(const String& value)
916 if (value == "shared")
917 return RWIProtocolEventDomainEventWithEnumParameterParameterShared;
918 if (value == "black")
919 return RWIProtocolEventDomainEventWithEnumParameterParameterBlack;
920 if (value == "white")
921 return RWIProtocolEventDomainEventWithEnumParameterParameterWhite;
922 ASSERT_NOT_REACHED();
923 return RWIProtocolEventDomainEventWithEnumParameterParameterShared;
926 } // namespace Inspector
928 ### End File: RWIProtocolEnumConversionHelpers.h
930 ### Begin File: RWIProtocolEventDispatchers.mm
932 * Copyright (C) 2013 Google Inc. All rights reserved.
933 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
934 * Copyright (C) 2014 University of Washington. All rights reserved.
936 * Redistribution and use in source and binary forms, with or without
937 * modification, are permitted provided that the following conditions
939 * 1. Redistributions of source code must retain the above copyright
940 * notice, this list of conditions and the following disclaimer.
941 * 2. Redistributions in binary form must reproduce the above copyright
942 * notice, this list of conditions and the following disclaimer in the
943 * documentation and/or other materials provided with the distribution.
945 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
946 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
947 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
948 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
949 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
950 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
951 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
952 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
953 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
954 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
955 * THE POSSIBILITY OF SUCH DAMAGE.
958 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
959 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
962 #import "RWIProtocolInternal.h"
964 #import "RWIProtocolEnumConversionHelpers.h"
965 #import <JavaScriptCore/InspectorFrontendChannel.h>
966 #import <JavaScriptCore/InspectorValues.h>
968 using namespace Inspector;
974 @implementation RWIProtocolEventDomainDomainEventDispatcher
976 AugmentableInspectorController* _controller;
979 - (instancetype)initWithController:(AugmentableInspectorController*)controller;
985 _controller = controller;
989 - (void)eventWithEnumParameterWithParameter:(RWIProtocolEventDomainEventWithEnumParameterParameter)parameter
991 FrontendChannel* frontendChannel = _controller->frontendChannel();
992 if (!frontendChannel)
995 Ref<InspectorObject> jsonMessage = InspectorObject::create();
996 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter"));
997 Ref<InspectorObject> paramsObject = InspectorObject::create();
998 paramsObject->setString(ASCIILiteral("parameter"), toProtocolString(parameter));
999 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject));
1000 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
1006 ### End File: RWIProtocolEventDispatchers.mm
1008 ### Begin File: RWIProtocol.h
1010 * Copyright (C) 2013 Google Inc. All rights reserved.
1011 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
1012 * Copyright (C) 2014 University of Washington. All rights reserved.
1014 * Redistribution and use in source and binary forms, with or without
1015 * modification, are permitted provided that the following conditions
1017 * 1. Redistributions of source code must retain the above copyright
1018 * notice, this list of conditions and the following disclaimer.
1019 * 2. Redistributions in binary form must reproduce the above copyright
1020 * notice, this list of conditions and the following disclaimer in the
1021 * documentation and/or other materials provided with the distribution.
1023 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1025 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1026 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1027 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1028 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1029 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1030 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1031 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1032 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1033 * THE POSSIBILITY OF SUCH DAMAGE.
1036 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
1037 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1039 #import <Foundation/Foundation.h>
1041 #import <WebInspector/RWIProtocolJSONObject.h>
1047 typedef NS_ENUM(NSInteger, RWIProtocolTypeDomainEnum) {
1048 RWIProtocolTypeDomainEnumShared,
1049 RWIProtocolTypeDomainEnumRed,
1050 RWIProtocolTypeDomainEnumGreen,
1051 RWIProtocolTypeDomainEnumBlue,
1054 typedef NS_ENUM(NSInteger, RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue) {
1055 RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared,
1056 RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan,
1057 RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta,
1058 RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow,
1061 typedef NS_ENUM(NSInteger, RWIProtocolEventDomainEventWithEnumParameterParameter) {
1062 RWIProtocolEventDomainEventWithEnumParameterParameterShared,
1063 RWIProtocolEventDomainEventWithEnumParameterParameterBlack,
1064 RWIProtocolEventDomainEventWithEnumParameterParameterWhite,
1069 @protocol RWIProtocolCommandDomainDomainHandler <NSObject>
1071 - (void)commandWithEnumReturnValueWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue))successCallback;
1074 __attribute__((visibility ("default")))
1075 @interface RWIProtocolEventDomainDomainEventDispatcher : NSObject
1076 - (void)eventWithEnumParameterWithParameter:(RWIProtocolEventDomainEventWithEnumParameterParameter)parameter;
1080 ### End File: RWIProtocol.h
1082 ### Begin File: RWIProtocolTypes.mm
1084 * Copyright (C) 2013 Google Inc. All rights reserved.
1085 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
1086 * Copyright (C) 2014 University of Washington. All rights reserved.
1088 * Redistribution and use in source and binary forms, with or without
1089 * modification, are permitted provided that the following conditions
1091 * 1. Redistributions of source code must retain the above copyright
1092 * notice, this list of conditions and the following disclaimer.
1093 * 2. Redistributions in binary form must reproduce the above copyright
1094 * notice, this list of conditions and the following disclaimer in the
1095 * documentation and/or other materials provided with the distribution.
1097 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1098 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1099 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1100 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1101 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1102 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1103 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1104 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1105 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1106 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1107 * THE POSSIBILITY OF SUCH DAMAGE.
1110 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
1111 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1114 #import "RWIProtocolInternal.h"
1116 #import "RWIProtocolEnumConversionHelpers.h"
1117 #import <JavaScriptCore/InspectorValues.h>
1118 #import <wtf/Assertions.h>
1120 using namespace Inspector;
1129 ### End File: RWIProtocolTypes.mm
1131 ### Begin File: RWIProtocolInternal.h
1133 * Copyright (C) 2013 Google Inc. All rights reserved.
1134 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
1135 * Copyright (C) 2014 University of Washington. All rights reserved.
1137 * Redistribution and use in source and binary forms, with or without
1138 * modification, are permitted provided that the following conditions
1140 * 1. Redistributions of source code must retain the above copyright
1141 * notice, this list of conditions and the following disclaimer.
1142 * 2. Redistributions in binary form must reproduce the above copyright
1143 * notice, this list of conditions and the following disclaimer in the
1144 * documentation and/or other materials provided with the distribution.
1146 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1147 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1148 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1149 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1150 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1151 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1152 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1153 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1154 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1155 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1156 * THE POSSIBILITY OF SUCH DAMAGE.
1159 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
1160 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1162 #import "RWIProtocol.h"
1163 #import "RWIProtocolJSONObjectInternal.h"
1164 #import <JavaScriptCore/AugmentableInspectorController.h>
1165 #import <JavaScriptCore/InspectorValues.h>
1167 @interface RWIProtocolEventDomainDomainEventDispatcher (Private)
1168 - (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller;
1172 ### End File: RWIProtocolInternal.h