### Begin File: InspectorBackendCommands.js /* * 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.registerCommand("Network1.loadResource", [], []); InspectorBackend.activateDomain("Network1"); // Network3. InspectorBackend.registerNetwork3Dispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Network3"); InspectorBackend.registerEvent("Network3.resourceLoaded", []); InspectorBackend.activateDomain("Network3"); ### End File: InspectorBackendCommands.js ### 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 "TestProtocolTypes.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; }; #if PLATFORM(WEB_COMMANDS) class AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher { public: virtual ~AlternateNetwork1BackendDispatcher() { } virtual void loadResource(long callId) = 0; }; #endif // PLATFORM(WEB_COMMANDS) } // 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 namespace Inspector { typedef String ErrorString; #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) #if PLATFORM(WEB_COMMANDS) class AlternateNetwork1BackendDispatcher; #endif // PLATFORM(WEB_COMMANDS) #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) #if PLATFORM(WEB_COMMANDS) class Network1BackendDispatcherHandler { public: virtual void loadResource(ErrorString&) = 0; protected: virtual ~Network1BackendDispatcherHandler(); }; #endif // PLATFORM(WEB_COMMANDS) #if PLATFORM(WEB_COMMANDS) class Network1BackendDispatcher final : public SupplementalBackendDispatcher { public: static Ref create(BackendDispatcher&, Network1BackendDispatcherHandler*); void dispatch(long requestId, const String& method, Ref&& message) override; private: void loadResource(long requestId, RefPtr&& parameters); #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) public: void setAlternateDispatcher(AlternateNetwork1BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; } private: AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr }; #endif private: Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*); Network1BackendDispatcherHandler* m_agent { nullptr }; }; #endif // PLATFORM(WEB_COMMANDS) } // 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 #include #include #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) #include "TestAlternateBackendDispatchers.h" #endif namespace Inspector { #if PLATFORM(WEB_COMMANDS) Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { } #endif // PLATFORM(WEB_COMMANDS) #if PLATFORM(WEB_COMMANDS) 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(ASCIILiteral("Network1"), this); } void Network1BackendDispatcher::dispatch(long requestId, const String& method, Ref&& message) { Ref protect(*this); RefPtr parameters; message->getObject(ASCIILiteral("params"), parameters); if (method == "loadResource") loadResource(requestId, WTFMove(parameters)); else m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "Network1", '.', method, "' was not found")); } void Network1BackendDispatcher::loadResource(long requestId, RefPtr&&) { #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) if (m_alternateDispatcher) { m_alternateDispatcher->loadResource(requestId); return; } #endif ErrorString error; Ref result = InspectorObject::create(); m_agent->loadResource(error); if (!error.length()) m_backendDispatcher->sendResponse(requestId, WTFMove(result)); else m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error)); } #endif // PLATFORM(WEB_COMMANDS) } // 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; #if PLATFORM(WEB_EVENTS) class Network3FrontendDispatcher { public: Network3FrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } void resourceLoaded(); private: FrontendRouter& m_frontendRouter; }; #endif // PLATFORM(WEB_EVENTS) } // 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 "InspectorFrontendRouter.h" #include namespace Inspector { #if PLATFORM(WEB_EVENTS) void Network3FrontendDispatcher::resourceLoaded() { Ref jsonMessage = InspectorObject::create(); jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded")); m_frontendRouter.sendEvent(jsonMessage->toJSONString()); } #endif // PLATFORM(WEB_EVENTS) } // 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 namespace Inspector { namespace Protocol { // Forward declarations. #if PLATFORM(WEB_TYPES) namespace Network2 { class NetworkError; } // Network2 #endif // PLATFORM(WEB_TYPES) // End of forward declarations. #if PLATFORM(WEB_TYPES) namespace Network2 { class NetworkError : public Inspector::InspectorObjectBase { 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)) { COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state); } friend class NetworkError; public: Builder& setMessage(const String& value) { COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); m_result->setString(ASCIILiteral("message"), value); return castState(); } Builder& setCode(int value) { COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); m_result->setInteger(ASCIILiteral("code"), value); return castState(); } Ref release() { COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready); COMPILE_ASSERT(sizeof(NetworkError) == sizeof(InspectorObject), cannot_cast); Ref result = m_result.releaseNonNull(); return WTFMove(*reinterpret_cast*>(&result)); } }; /* * Synthetic constructor: * Ref result = NetworkError::create() * .setMessage(...) * .setCode(...) * .release(); */ static Builder create() { return Builder(InspectorObject::create()); } }; } // Network2 #endif // PLATFORM(WEB_TYPES) } // 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 #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 { #if PLATFORM(WEB_COMMANDS) class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher { public: ObjCInspectorNetwork1BackendDispatcher(id handler) { m_delegate = handler; } virtual void loadResource(long requestId) override; private: RetainPtr> m_delegate; }; #endif // PLATFORM(WEB_COMMANDS) } // namespace Inspector ### End File: TestProtocolBackendDispatchers.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 "config.h" #import "TestProtocolConfiguration.h" #import "TestProtocolInternal.h" #import "TestProtocolBackendDispatchers.h" #import #import #import #import using namespace Inspector; @implementation TestProtocolConfiguration { AugmentableInspectorController* _controller; id _network1Handler; TestProtocolNetwork3DomainEventDispatcher *_network3EventDispatcher; } - (instancetype)initWithController:(AugmentableInspectorController*)controller { self = [super init]; if (!self) return nil; ASSERT(controller); _controller = controller; return self; } - (void)dealloc { [_network1Handler release]; [_network3EventDispatcher release]; [super dealloc]; } - (void)setNetwork1Handler:(id)handler { if (handler == _network1Handler) return; [_network1Handler release]; _network1Handler = [handler retain]; auto alternateDispatcher = std::make_unique(handler); auto alternateAgent = std::make_unique>(ASCIILiteral("Network1"), *_controller, WTFMove(alternateDispatcher)); _controller->appendExtraAgent(WTFMove(alternateAgent)); } - (id)network1Handler { return _network1Handler; } - (TestProtocolNetwork3DomainEventDispatcher *)network3EventDispatcher { if (!_network3EventDispatcher) _network3EventDispatcher = [[TestProtocolNetwork3DomainEventDispatcher alloc] initWithController:_controller]; return _network3EventDispatcher; } @end ### End File: TestProtocolConfiguration.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: 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 { #if PLATFORM(WEB_COMMANDS) void ObjCInspectorNetwork1BackendDispatcher::loadResource(long requestId) { id errorCallback = ^(NSString *error) { backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error); backendDispatcher()->sendPendingErrors(); }; id successCallback = ^{ backendDispatcher()->sendResponse(requestId, InspectorObject::create()); }; [m_delegate loadResourceWithErrorCallback:errorCallback successCallback:successCallback]; } #endif // PLATFORM(WEB_COMMANDS) } // namespace Inspector ### End File: TestProtocolBackendDispatchers.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 "config.h" #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(); Ref jsonMessage = InspectorObject::create(); jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded")); router.sendEvent(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)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject; - (instancetype)initWithMessage:(NSString *)message code:(int)code; /* required */ @property (nonatomic, copy) NSString *message; /* required */ @property (nonatomic, assign) int code; @end @protocol TestProtocolNetwork1DomainHandler @required - (void)loadResourceWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback; @end __attribute__((visibility ("default"))) @interface TestProtocolNetwork3DomainEventDispatcher : NSObject - (void)resourceLoaded; @end ### 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 namespace Inspector { template ObjCEnumType 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 "config.h" #import "TestProtocolTypeConversions.h" #import "TestProtocol.h" #import "TestProtocolTypeParser.h" #import using namespace Inspector; @interface TestProtocolTypeConversions (Network1Domain) @end @interface TestProtocolTypeConversions (Network2Domain) + (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload; @end @interface TestProtocolTypeConversions (Network3Domain) @end @implementation TestProtocolTypeConversions (Network1Domain) @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 @implementation TestProtocolTypeConversions (Network3Domain) @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 "config.h" #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)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject { if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].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