| ### 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| // DomainA. |
| InspectorBackend.registerCommand("DomainA.enable", [], []); |
| InspectorBackend.activateDomain("DomainA", ["web"]); |
| |
| // DomainB. |
| InspectorBackend.registerCommand("DomainB.enable", [], []); |
| InspectorBackend.activateDomain("DomainB"); |
| ### 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #pragma once |
| |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| |
| #include "TestProtocolTypes.h" |
| #include <JavaScriptCore/InspectorBackendDispatcher.h> |
| #include <JavaScriptCore/InspectorFrontendRouter.h> |
| |
| namespace Inspector { |
| |
| class AlternateBackendDispatcher { |
| public: |
| void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); } |
| BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); } |
| private: |
| RefPtr<BackendDispatcher> m_backendDispatcher; |
| }; |
| |
| |
| class AlternateDomainABackendDispatcher : public AlternateBackendDispatcher { |
| public: |
| virtual ~AlternateDomainABackendDispatcher() { } |
| virtual void enable(long callId) = 0; |
| }; |
| class AlternateDomainBBackendDispatcher : public AlternateBackendDispatcher { |
| public: |
| virtual ~AlternateDomainBBackendDispatcher() { } |
| virtual void enable(long callId) = 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #pragma once |
| |
| #include "TestProtocolObjects.h" |
| #include <JavaScriptCore/InspectorBackendDispatcher.h> |
| #include <wtf/text/WTFString.h> |
| |
| namespace Inspector { |
| |
| typedef String ErrorString; |
| |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| class AlternateDomainABackendDispatcher; |
| class AlternateDomainBBackendDispatcher; |
| #endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| |
| class DomainABackendDispatcherHandler { |
| public: |
| virtual void enable(ErrorString&) = 0; |
| protected: |
| virtual ~DomainABackendDispatcherHandler(); |
| }; |
| |
| class DomainBBackendDispatcherHandler { |
| public: |
| virtual void enable(ErrorString&) = 0; |
| protected: |
| virtual ~DomainBBackendDispatcherHandler(); |
| }; |
| |
| class DomainABackendDispatcher final : public SupplementalBackendDispatcher { |
| public: |
| static Ref<DomainABackendDispatcher> create(BackendDispatcher&, DomainABackendDispatcherHandler*); |
| void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override; |
| private: |
| void enable(long requestId, RefPtr<JSON::Object>&& parameters); |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| public: |
| void setAlternateDispatcher(AlternateDomainABackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; } |
| private: |
| AlternateDomainABackendDispatcher* m_alternateDispatcher { nullptr }; |
| #endif |
| private: |
| DomainABackendDispatcher(BackendDispatcher&, DomainABackendDispatcherHandler*); |
| DomainABackendDispatcherHandler* m_agent { nullptr }; |
| }; |
| |
| class DomainBBackendDispatcher final : public SupplementalBackendDispatcher { |
| public: |
| static Ref<DomainBBackendDispatcher> create(BackendDispatcher&, DomainBBackendDispatcherHandler*); |
| void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override; |
| private: |
| void enable(long requestId, RefPtr<JSON::Object>&& parameters); |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| public: |
| void setAlternateDispatcher(AlternateDomainBBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; } |
| private: |
| AlternateDomainBBackendDispatcher* m_alternateDispatcher { nullptr }; |
| #endif |
| private: |
| DomainBBackendDispatcher(BackendDispatcher&, DomainBBackendDispatcherHandler*); |
| DomainBBackendDispatcherHandler* 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #include "config.h" |
| #include "TestBackendDispatchers.h" |
| |
| #include <JavaScriptCore/InspectorFrontendRouter.h> |
| #include <wtf/JSONValues.h> |
| #include <wtf/NeverDestroyed.h> |
| #include <wtf/text/CString.h> |
| |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| #include "TestAlternateBackendDispatchers.h" |
| #endif |
| |
| namespace Inspector { |
| |
| DomainABackendDispatcherHandler::~DomainABackendDispatcherHandler() { } |
| DomainBBackendDispatcherHandler::~DomainBBackendDispatcherHandler() { } |
| |
| Ref<DomainABackendDispatcher> DomainABackendDispatcher::create(BackendDispatcher& backendDispatcher, DomainABackendDispatcherHandler* agent) |
| { |
| return adoptRef(*new DomainABackendDispatcher(backendDispatcher, agent)); |
| } |
| |
| DomainABackendDispatcher::DomainABackendDispatcher(BackendDispatcher& backendDispatcher, DomainABackendDispatcherHandler* agent) |
| : SupplementalBackendDispatcher(backendDispatcher) |
| , m_agent(agent) |
| { |
| m_backendDispatcher->registerDispatcherForDomain("DomainA"_s, this); |
| } |
| |
| void DomainABackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) |
| { |
| Ref<DomainABackendDispatcher> protect(*this); |
| |
| RefPtr<JSON::Object> parameters; |
| message->getObject("params"_s, parameters); |
| |
| if (method == "enable") |
| enable(requestId, WTFMove(parameters)); |
| else |
| m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'DomainA." + method + "' was not found"); |
| } |
| |
| void DomainABackendDispatcher::enable(long requestId, RefPtr<JSON::Object>&&) |
| { |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| if (m_alternateDispatcher) { |
| m_alternateDispatcher->enable(requestId); |
| return; |
| } |
| #endif |
| |
| ErrorString error; |
| Ref<JSON::Object> result = JSON::Object::create(); |
| m_agent->enable(error); |
| |
| if (!error.length()) |
| m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); |
| else |
| m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error)); |
| } |
| |
| Ref<DomainBBackendDispatcher> DomainBBackendDispatcher::create(BackendDispatcher& backendDispatcher, DomainBBackendDispatcherHandler* agent) |
| { |
| return adoptRef(*new DomainBBackendDispatcher(backendDispatcher, agent)); |
| } |
| |
| DomainBBackendDispatcher::DomainBBackendDispatcher(BackendDispatcher& backendDispatcher, DomainBBackendDispatcherHandler* agent) |
| : SupplementalBackendDispatcher(backendDispatcher) |
| , m_agent(agent) |
| { |
| m_backendDispatcher->registerDispatcherForDomain("DomainB"_s, this); |
| } |
| |
| void DomainBBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) |
| { |
| Ref<DomainBBackendDispatcher> protect(*this); |
| |
| RefPtr<JSON::Object> parameters; |
| message->getObject("params"_s, parameters); |
| |
| if (method == "enable") |
| enable(requestId, WTFMove(parameters)); |
| else |
| m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'DomainB." + method + "' was not found"); |
| } |
| |
| void DomainBBackendDispatcher::enable(long requestId, RefPtr<JSON::Object>&&) |
| { |
| #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) |
| if (m_alternateDispatcher) { |
| m_alternateDispatcher->enable(requestId); |
| return; |
| } |
| #endif |
| |
| ErrorString error; |
| Ref<JSON::Object> result = JSON::Object::create(); |
| m_agent->enable(error); |
| |
| if (!error.length()) |
| m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); |
| else |
| m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error)); |
| } |
| |
| } // 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #pragma once |
| |
| #include "TestProtocolObjects.h" |
| #include <wtf/JSONValues.h> |
| #include <wtf/text/WTFString.h> |
| |
| namespace Inspector { |
| |
| class 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #include "config.h" |
| #include "TestFrontendDispatchers.h" |
| |
| #include <JavaScriptCore/InspectorFrontendRouter.h> |
| #include <wtf/text/CString.h> |
| |
| namespace Inspector { |
| |
| } // 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #pragma once |
| |
| #include <JavaScriptCore/InspectorProtocolTypes.h> |
| #include <wtf/Assertions.h> |
| |
| namespace Inspector { |
| |
| |
| |
| namespace Protocol { |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| } // 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #include "config.h" |
| #include "TestProtocolObjects.h" |
| |
| #include <wtf/Optional.h> |
| #include <wtf/text/CString.h> |
| |
| 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #include <JavaScriptCore/InspectorAlternateBackendDispatchers.h> |
| #include <wtf/RetainPtr.h> |
| |
| @protocol TestProtocolDomainADomainHandler; |
| @protocol TestProtocolDomainBDomainHandler; |
| |
| namespace Inspector { |
| |
| |
| class ObjCInspectorDomainABackendDispatcher final : public AlternateDomainABackendDispatcher { |
| WTF_MAKE_FAST_ALLOCATED; |
| public: |
| ObjCInspectorDomainABackendDispatcher(id<TestProtocolDomainADomainHandler> handler) { m_delegate = handler; } |
| virtual void enable(long requestId) override; |
| private: |
| RetainPtr<id<TestProtocolDomainADomainHandler>> m_delegate; |
| }; |
| |
| class ObjCInspectorDomainBBackendDispatcher final : public AlternateDomainBBackendDispatcher { |
| WTF_MAKE_FAST_ALLOCATED; |
| public: |
| ObjCInspectorDomainBBackendDispatcher(id<TestProtocolDomainBDomainHandler> handler) { m_delegate = handler; } |
| virtual void enable(long requestId) override; |
| private: |
| RetainPtr<id<TestProtocolDomainBDomainHandler>> 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 domain-availability.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 <wtf/JSONValues.h> |
| |
| namespace Inspector { |
| |
| void ObjCInspectorDomainABackendDispatcher::enable(long requestId) |
| { |
| id errorCallback = ^(NSString *error) { |
| backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error); |
| backendDispatcher()->sendPendingErrors(); |
| }; |
| |
| id successCallback = ^{ |
| backendDispatcher()->sendResponse(requestId, JSON::Object::create(), false); |
| }; |
| |
| [m_delegate enableWithErrorCallback:errorCallback successCallback:successCallback]; |
| } |
| |
| |
| void ObjCInspectorDomainBBackendDispatcher::enable(long requestId) |
| { |
| id errorCallback = ^(NSString *error) { |
| backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error); |
| backendDispatcher()->sendPendingErrors(); |
| }; |
| |
| id successCallback = ^{ |
| backendDispatcher()->sendResponse(requestId, JSON::Object::create(), false); |
| }; |
| |
| [m_delegate enableWithErrorCallback: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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import <WebInspector/TestProtocol.h> |
| |
| __attribute__((visibility ("default"))) |
| @interface TestProtocolConfiguration : NSObject |
| @property (nonatomic, retain, setter=setDomainAHandler:) id<TestProtocolDomainADomainHandler> domainAHandler; |
| @property (nonatomic, retain, setter=setDomainBHandler:) id<TestProtocolDomainBDomainHandler> domainBHandler; |
| @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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import "TestProtocolConfiguration.h" |
| |
| #import "TestProtocolInternal.h" |
| #import "TestProtocolBackendDispatchers.h" |
| #import <JavaScriptCore/AlternateDispatchableAgent.h> |
| #import <JavaScriptCore/AugmentableInspectorController.h> |
| #import <JavaScriptCore/InspectorAlternateBackendDispatchers.h> |
| #import <JavaScriptCore/InspectorBackendDispatchers.h> |
| |
| using namespace Inspector; |
| |
| @implementation TestProtocolConfiguration |
| { |
| AugmentableInspectorController* _controller; |
| id<TestProtocolDomainADomainHandler> _domainAHandler; |
| id<TestProtocolDomainBDomainHandler> _domainBHandler; |
| } |
| |
| - (instancetype)initWithController:(AugmentableInspectorController*)controller |
| { |
| self = [super init]; |
| if (!self) |
| return nil; |
| ASSERT(controller); |
| _controller = controller; |
| return self; |
| } |
| |
| - (void)dealloc |
| { |
| [_domainAHandler release]; |
| [_domainBHandler release]; |
| [super dealloc]; |
| } |
| |
| - (void)setDomainAHandler:(id<TestProtocolDomainADomainHandler>)handler |
| { |
| if (handler == _domainAHandler) |
| return; |
| |
| [_domainAHandler release]; |
| _domainAHandler = [handler retain]; |
| |
| auto alternateDispatcher = makeUnique<ObjCInspectorDomainABackendDispatcher>(handler); |
| auto alternateAgent = makeUnique<AlternateDispatchableAgent<DomainABackendDispatcher, AlternateDomainABackendDispatcher>>("DomainA"_s, *_controller, WTFMove(alternateDispatcher)); |
| _controller->appendExtraAgent(WTFMove(alternateAgent)); |
| } |
| |
| - (id<TestProtocolDomainADomainHandler>)domainAHandler |
| { |
| return _domainAHandler; |
| } |
| |
| - (void)setDomainBHandler:(id<TestProtocolDomainBDomainHandler>)handler |
| { |
| if (handler == _domainBHandler) |
| return; |
| |
| [_domainBHandler release]; |
| _domainBHandler = [handler retain]; |
| |
| auto alternateDispatcher = makeUnique<ObjCInspectorDomainBBackendDispatcher>(handler); |
| auto alternateAgent = makeUnique<AlternateDispatchableAgent<DomainBBackendDispatcher, AlternateDomainBBackendDispatcher>>("DomainB"_s, *_controller, WTFMove(alternateDispatcher)); |
| _controller->appendExtraAgent(WTFMove(alternateAgent)); |
| } |
| |
| - (id<TestProtocolDomainBDomainHandler>)domainBHandler |
| { |
| return _domainBHandler; |
| } |
| |
| @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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import "TestProtocolInternal.h" |
| |
| #import "TestProtocolTypeConversions.h" |
| #import <wtf/JSONValues.h> |
| |
| using namespace Inspector; |
| |
| |
| ### 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import <Foundation/Foundation.h> |
| |
| #import <WebInspector/RWIProtocolJSONObject.h> |
| |
| |
| |
| |
| typedef NS_ENUM(NSInteger, TestProtocolPlatform) { |
| TestProtocolPlatformAll, |
| TestProtocolPlatformGeneric, |
| TestProtocolPlatformIOS, |
| TestProtocolPlatformMacOS, |
| }; |
| |
| |
| |
| |
| |
| @protocol TestProtocolDomainADomainHandler <NSObject> |
| @required |
| - (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback; |
| @end |
| |
| @protocol TestProtocolDomainBDomainHandler <NSObject> |
| @required |
| - (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback; |
| @end |
| |
| |
| |
| |
| #import <WebInspector/RWIProtocolBuildCompatibilityObjects.h> |
| |
| ### 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import "TestProtocol.h" |
| #import "TestProtocolJSONObjectPrivate.h" |
| #import <JavaScriptCore/AugmentableInspectorController.h> |
| #import <wtf/JSONValues.h> |
| |
| |
| |
| |
| ### 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import "TestProtocol.h" |
| #import <WebInspector/RWIProtocolArrayConversions.h> |
| |
| namespace Inspector { |
| |
| template<typename ObjCEnumType> |
| Optional<ObjCEnumType> fromProtocolString(const String& value); |
| |
| inline String toProtocolString(TestProtocolPlatform value) |
| { |
| switch(value) { |
| case TestProtocolPlatformAll: |
| return "all"_s; |
| case TestProtocolPlatformGeneric: |
| return "generic"_s; |
| case TestProtocolPlatformIOS: |
| return "ios"_s; |
| case TestProtocolPlatformMacOS: |
| return "macos"_s; |
| } |
| } |
| |
| template<> |
| inline Optional<TestProtocolPlatform> fromProtocolString(const String& value) |
| { |
| if (value == "all") |
| return TestProtocolPlatformAll; |
| if (value == "generic") |
| return TestProtocolPlatformGeneric; |
| if (value == "ios") |
| return TestProtocolPlatformIOS; |
| if (value == "macos") |
| return TestProtocolPlatformMacOS; |
| return WTF::nullopt; |
| } |
| |
| } // 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import "TestProtocolTypeConversions.h" |
| |
| #import "TestProtocol.h" |
| #import "TestProtocolTypeParser.h" |
| #import <WebInspector/RWIProtocolJSONObjectPrivate.h> |
| |
| using namespace Inspector; |
| |
| |
| |
| |
| |
| |
| ### 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 domain-availability.json |
| // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py |
| |
| #import "TestProtocolInternal.h" |
| |
| #import "TestProtocolTypeConversions.h" |
| #import <WebInspector/RWIProtocolJSONObjectPrivate.h> |
| #import <wtf/Assertions.h> |
| #import <wtf/JSONValues.h> |
| |
| using namespace Inspector; |
| |
| |
| ### End File: TestProtocolTypes.mm |