### Begin File: InspectorBackendCommands.js.in /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py // Network1 InspectorBackend.registerDomain("Network1", null); InspectorBackend.registerCommand("Network1.loadResource", null, [], []); InspectorBackend.activateDomain("Network1", null); // Network3 InspectorBackend.registerDomain("Network3", null); InspectorBackend.registerEvent("Network3.resourceLoaded", null, []); InspectorBackend.registerNetwork3Dispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Network3"); InspectorBackend.activateDomain("Network3", null); ### End File: InspectorBackendCommands.js.in ### Begin File: TestAlternateBackendDispatchers.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #pragma once #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) #include "TestProtocolObjects.h" #include #include namespace Inspector { class AlternateBackendDispatcher { public: void setBackendDispatcher(RefPtr&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); } BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); } private: RefPtr m_backendDispatcher; }; class AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher { public: virtual ~AlternateNetwork1BackendDispatcher() { } virtual void loadResource(long protocol_requestId) = 0; }; } // namespace Inspector #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) ### End File: TestAlternateBackendDispatchers.h ### Begin File: TestBackendDispatchers.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #pragma once #include "TestProtocolObjects.h" #include #include #include #include namespace Inspector { #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) class AlternateNetwork1BackendDispatcher; #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) class Network1BackendDispatcherHandler { public: virtual Protocol::ErrorStringOr loadResource() = 0; protected: virtual ~Network1BackendDispatcherHandler(); }; class Network1BackendDispatcher final : public SupplementalBackendDispatcher { public: static Ref create(BackendDispatcher&, Network1BackendDispatcherHandler*); void dispatch(long protocol_requestId, const String& protocol_method, Ref&& protocol_message) final; private: void loadResource(long protocol_requestId, RefPtr&& protocol_parameters); #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) public: void setAlternateDispatcher(AlternateNetwork1BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; } private: AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr }; #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) private: Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*); Network1BackendDispatcherHandler* m_agent { nullptr }; }; } // namespace Inspector ### End File: TestBackendDispatchers.h ### Begin File: TestBackendDispatchers.cpp /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #include "config.h" #include "TestBackendDispatchers.h" #include #include #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) #include "TestAlternateBackendDispatchers.h" #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) namespace Inspector { Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { } Ref Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent) { return adoptRef(*new Network1BackendDispatcher(backendDispatcher, agent)); } Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent) : SupplementalBackendDispatcher(backendDispatcher) , m_agent(agent) { m_backendDispatcher->registerDispatcherForDomain("Network1"_s, this); } void Network1BackendDispatcher::dispatch(long protocol_requestId, const String& protocol_method, Ref&& protocol_message) { Ref protect(*this); auto protocol_parameters = protocol_message->getObject("params"_s); if (protocol_method == "loadResource"_s) { loadResource(protocol_requestId, WTFMove(protocol_parameters)); return; } m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString("'Network1."_s, protocol_method, "' was not found"_s)); } void Network1BackendDispatcher::loadResource(long protocol_requestId, RefPtr&&) { #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) if (m_alternateDispatcher) { m_alternateDispatcher->loadResource(protocol_requestId); return; } #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) auto result = m_agent->loadResource(); if (!result) { ASSERT(!result.error().isEmpty()); m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error()); return; } auto protocol_jsonMessage = JSON::Object::create(); m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false); } } // namespace Inspector ### End File: TestBackendDispatchers.cpp ### Begin File: TestFrontendDispatchers.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #pragma once #include "TestProtocolObjects.h" #include #include namespace Inspector { class FrontendRouter; class Network3FrontendDispatcher { WTF_MAKE_FAST_ALLOCATED; public: Network3FrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } void resourceLoaded(); private: FrontendRouter& m_frontendRouter; }; } // namespace Inspector ### End File: TestFrontendDispatchers.h ### Begin File: TestFrontendDispatchers.cpp /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #include "config.h" #include "TestFrontendDispatchers.h" #include namespace Inspector { void Network3FrontendDispatcher::resourceLoaded() { auto protocol_jsonMessage = JSON::Object::create(); protocol_jsonMessage->setString("method"_s, "Network3.resourceLoaded"_s); m_frontendRouter.sendEvent(protocol_jsonMessage->toJSONString()); } } // namespace Inspector ### End File: TestFrontendDispatchers.cpp ### Begin File: TestProtocolObjects.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #pragma once #include #include #include namespace Inspector { namespace Protocol { // Forward declarations. namespace Network2 { class NetworkError; } // Network2 // End of forward declarations. namespace Network2 { class NetworkError final : public JSON::ObjectBase { public: enum { NoFieldsSet = 0, MessageSet = 1 << 0, CodeSet = 1 << 1, AllFieldsSet = (MessageSet | CodeSet) }; template class Builder { private: RefPtr m_result; template Builder& castState() { return *reinterpret_cast*>(this); } Builder(Ref&& object) : m_result(WTFMove(object)) { static_assert(STATE == NoFieldsSet, "builder created in non init state"); } friend class NetworkError; public: Builder& setMessage(const String& in_message) { static_assert(!(STATE & MessageSet), "property message already set"); m_result->setString("message"_s, in_message); return castState(); } Builder& setCode(int in_code) { static_assert(!(STATE & CodeSet), "property code already set"); m_result->setInteger("code"_s, in_code); return castState(); } Ref release() { static_assert(STATE == AllFieldsSet, "result is not ready"); static_assert(sizeof(NetworkError) == sizeof(JSON::Object), "cannot cast"); Ref jsonResult = m_result.releaseNonNull(); auto result = WTFMove(*reinterpret_cast*>(&jsonResult)); return result; } }; /* * Synthetic constructor: * Ref result = NetworkError::create() * .setMessage(...) * .setCode(...) * .release(); */ static Builder create() { return Builder(JSON::Object::create()); } }; } // Network2 } // namespace Protocol } // namespace Inspector ### End File: TestProtocolObjects.h ### Begin File: TestProtocolObjects.cpp /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #include "config.h" #include "TestProtocolObjects.h" #include namespace Inspector { namespace Protocol { } // namespace Protocol } // namespace Inspector ### End File: TestProtocolObjects.cpp ### Begin File: TestProtocolBackendDispatchers.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #include #include @protocol TestProtocolNetwork1DomainHandler; namespace Inspector { class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher { WTF_MAKE_FAST_ALLOCATED; public: ObjCInspectorNetwork1BackendDispatcher(id handler) { m_delegate = handler; } void loadResource(long protocol_requestId) final; private: RetainPtr> m_delegate; }; } // namespace Inspector ### End File: TestProtocolBackendDispatchers.h ### Begin File: TestProtocolBackendDispatchers.mm /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "config.h" #import "TestProtocolBackendDispatchers.h" #include "TestProtocolInternal.h" #include "TestProtocolTypeConversions.h" #include namespace Inspector { void ObjCInspectorNetwork1BackendDispatcher::loadResource(long protocol_requestId) { if (![m_delegate respondsToSelector:@selector(loadResourceWithErrorCallback:successCallback:)]) { backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network1.loadResource' was not found"_s); backendDispatcher()->sendPendingErrors(); return; } id errorCallback = ^(NSString *error) { backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error); backendDispatcher()->sendPendingErrors(); }; id successCallback = ^{ auto protocol_jsonMessage = JSON::Object::create(); backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false); }; [m_delegate loadResourceWithErrorCallback:errorCallback successCallback:successCallback]; } } // namespace Inspector ### End File: TestProtocolBackendDispatchers.mm ### Begin File: TestProtocolConfiguration.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import __attribute__((visibility ("default"))) @interface TestProtocolConfiguration : NSObject @property (nonatomic, retain, setter=setNetwork1Handler:) id network1Handler; @property (nonatomic, readonly) TestProtocolNetwork3DomainEventDispatcher *network3EventDispatcher; @end ### End File: TestProtocolConfiguration.h ### Begin File: TestProtocolConfiguration.mm /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "TestProtocolConfiguration.h" #import "TestProtocolInternal.h" #import "TestProtocolBackendDispatchers.h" #import #import #import #import using namespace Inspector; @implementation TestProtocolConfiguration { AugmentableInspectorController* _controller; RetainPtr> _network1Handler; RetainPtr _network3EventDispatcher; } - (instancetype)initWithController:(AugmentableInspectorController*)controller { self = [super init]; if (!self) return nil; ASSERT(controller); _controller = controller; return self; } - (void)setNetwork1Handler:(id)handler { if (handler == _network1Handler) return; _network1Handler = handler; auto alternateDispatcher = makeUnique(handler); auto alternateAgent = makeUnique>("Network1"_s, *_controller, WTFMove(alternateDispatcher)); _controller->registerAlternateAgent(WTFMove(alternateAgent)); } - (id)network1Handler { return _network1Handler.get(); } - (TestProtocolNetwork3DomainEventDispatcher *)network3EventDispatcher { if (!_network3EventDispatcher) _network3EventDispatcher = adoptNS([[TestProtocolNetwork3DomainEventDispatcher alloc] initWithController:_controller]); return _network3EventDispatcher.get(); } @end ### End File: TestProtocolConfiguration.mm ### Begin File: TestProtocolEventDispatchers.mm /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "TestProtocolInternal.h" #import "TestProtocolTypeConversions.h" #import using namespace Inspector; @implementation TestProtocolNetwork3DomainEventDispatcher { AugmentableInspectorController* _controller; } - (instancetype)initWithController:(AugmentableInspectorController*)controller { self = [super init]; if (!self) return nil; ASSERT(controller); _controller = controller; return self; } - (void)resourceLoaded { const FrontendRouter& router = _controller->frontendRouter(); auto protocol_jsonMessage = JSON::Object::create(); protocol_jsonMessage->setString("method"_s, "Network3.resourceLoaded"_s); router.sendEvent(protocol_jsonMessage->toJSONString()); } @end ### End File: TestProtocolEventDispatchers.mm ### Begin File: TestProtocol.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import #import @class TestProtocolNetwork2NetworkError; __attribute__((visibility ("default"))) @interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject - (instancetype)initWithPayload:(NSDictionary *)payload; - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject; - (instancetype)initWithMessage:(NSString *)message code:(int)code; /* required */ @property (nonatomic, copy) NSString *message; /* required */ @property (nonatomic, assign) int code; @end @protocol TestProtocolNetwork1DomainHandler @optional - (void)loadResourceWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback; @end __attribute__((visibility ("default"))) @interface TestProtocolNetwork3DomainEventDispatcher : NSObject - (void)resourceLoaded; @end #import ### End File: TestProtocol.h ### Begin File: TestProtocolInternal.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "TestProtocol.h" #import "TestProtocolJSONObjectPrivate.h" #import #import @interface TestProtocolNetwork3DomainEventDispatcher (Private) - (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller; @end ### End File: TestProtocolInternal.h ### Begin File: TestProtocolTypeConversions.h /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "TestProtocol.h" #import #import namespace Inspector { template std::optional fromProtocolString(const String& value); } // namespace Inspector ### End File: TestProtocolTypeConversions.h ### Begin File: TestProtocolTypeConversions.mm /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "TestProtocolTypeConversions.h" #import "TestProtocol.h" #import "TestProtocolTypeParser.h" #import using namespace Inspector; @interface TestProtocolTypeConversions (Network2Domain) + (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload; @end @implementation TestProtocolTypeConversions (Network2Domain) + (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload { THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]); *outValue = [[TestProtocolNetwork2NetworkError alloc] initWithPayload:payload]; } @end ### End File: TestProtocolTypeConversions.mm ### Begin File: TestProtocolTypes.mm /* * Copyright (C) 2013 Google Inc. All rights reserved. * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * Copyright (C) 2014 University of Washington. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py #import "TestProtocolInternal.h" #import "TestProtocolTypeConversions.h" #import #import #import using namespace Inspector; @implementation TestProtocolNetwork2NetworkError - (instancetype)initWithPayload:(nonnull NSDictionary *)payload { if (!(self = [super init])) return nil; THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"message"], @"message"); self.message = payload[@"message"]; THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"code"], @"code"); self.code = [payload[@"code"] integerValue]; return self; } - (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object { if (!(self = [super initWithJSONObject:[object toJSONObject].get()])) return nil; return self; } - (instancetype)initWithMessage:(NSString *)message code:(int)code { if (!(self = [super init])) return nil; THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message"); self.message = message; self.code = code; return self; } - (void)setMessage:(NSString *)message { [super setString:message forKey:@"message"]; } - (NSString *)message { return [super stringForKey:@"message"]; } - (void)setCode:(int)code { [super setInteger:code forKey:@"code"]; } - (int)code { return [super integerForKey:@"code"]; } @end ### End File: TestProtocolTypes.mm