domains-with-varying-command-sizes.json-result [plain text]
### Begin File: InspectorBackendCommands.js.in
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
* Copyright (C) 2013-2016 Apple Inc. All rights reserved.
* Copyright (C) 2014 University of Washington. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
// Network1
InspectorBackend.registerDomain("Network1", null);
InspectorBackend.registerCommand("Network1.loadResource1", null, [], []);
InspectorBackend.activateDomain("Network1", null);
// Network3
InspectorBackend.registerDomain("Network3", null);
InspectorBackend.registerCommand("Network3.loadResource1", null, [], []);
InspectorBackend.registerCommand("Network3.loadResource2", null, [], []);
InspectorBackend.registerCommand("Network3.loadResource3", null, [], []);
InspectorBackend.registerCommand("Network3.loadResource4", null, [], []);
InspectorBackend.registerCommand("Network3.loadResource5", null, [], []);
InspectorBackend.registerCommand("Network3.loadResource6", null, [], []);
InspectorBackend.registerCommand("Network3.loadResource7", null, [], []);
InspectorBackend.activateDomain("Network3", null);
### End File: InspectorBackendCommands.js.in
### Begin File: TestAlternateBackendDispatchers.h
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
* Copyright (C) 2013-2016 Apple Inc. All rights reserved.
* Copyright (C) 2014 University of Washington. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#pragma once
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
#include "TestProtocolObjects.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 AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher {
public:
virtual ~AlternateNetwork1BackendDispatcher() { }
virtual void loadResource1(long protocol_requestId) = 0;
};
class AlternateNetwork3BackendDispatcher : public AlternateBackendDispatcher {
public:
virtual ~AlternateNetwork3BackendDispatcher() { }
virtual void loadResource1(long protocol_requestId) = 0;
virtual void loadResource2(long protocol_requestId) = 0;
virtual void loadResource3(long protocol_requestId) = 0;
virtual void loadResource4(long protocol_requestId) = 0;
virtual void loadResource5(long protocol_requestId) = 0;
virtual void loadResource6(long protocol_requestId) = 0;
virtual void loadResource7(long protocol_requestId) = 0;
};
} // namespace Inspector
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
### End File: TestAlternateBackendDispatchers.h
### Begin File: TestBackendDispatchers.h
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
* Copyright (C) 2013-2016 Apple Inc. All rights reserved.
* Copyright (C) 2014 University of Washington. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#pragma once
#include "TestProtocolObjects.h"
#include <JavaScriptCore/InspectorBackendDispatcher.h>
#include <tuple>
#include <wtf/Expected.h>
#include <wtf/Optional.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
class AlternateNetwork1BackendDispatcher;
class AlternateNetwork3BackendDispatcher;
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
class Network1BackendDispatcherHandler {
public:
virtual Protocol::ErrorStringOr<void> loadResource1() = 0;
protected:
virtual ~Network1BackendDispatcherHandler();
};
class Network3BackendDispatcherHandler {
public:
virtual Protocol::ErrorStringOr<void> loadResource1() = 0;
virtual Protocol::ErrorStringOr<void> loadResource2() = 0;
virtual Protocol::ErrorStringOr<void> loadResource3() = 0;
virtual Protocol::ErrorStringOr<void> loadResource4() = 0;
virtual Protocol::ErrorStringOr<void> loadResource5() = 0;
virtual Protocol::ErrorStringOr<void> loadResource6() = 0;
virtual Protocol::ErrorStringOr<void> loadResource7() = 0;
protected:
virtual ~Network3BackendDispatcherHandler();
};
class Network1BackendDispatcher final : public SupplementalBackendDispatcher {
public:
static Ref<Network1BackendDispatcher> create(BackendDispatcher&, Network1BackendDispatcherHandler*);
void dispatch(long protocol_requestId, const String& protocol_method, Ref<JSON::Object>&& protocol_message) final;
private:
void loadResource1(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
public:
void setAlternateDispatcher(AlternateNetwork1BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
private:
AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr };
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
private:
Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*);
Network1BackendDispatcherHandler* m_agent { nullptr };
};
class Network3BackendDispatcher final : public SupplementalBackendDispatcher {
public:
static Ref<Network3BackendDispatcher> create(BackendDispatcher&, Network3BackendDispatcherHandler*);
void dispatch(long protocol_requestId, const String& protocol_method, Ref<JSON::Object>&& protocol_message) final;
private:
void loadResource1(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
void loadResource2(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
void loadResource3(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
void loadResource4(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
void loadResource5(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
void loadResource6(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
void loadResource7(long protocol_requestId, RefPtr<JSON::Object>&& protocol_parameters);
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
public:
void setAlternateDispatcher(AlternateNetwork3BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
private:
AlternateNetwork3BackendDispatcher* m_alternateDispatcher { nullptr };
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
private:
Network3BackendDispatcher(BackendDispatcher&, Network3BackendDispatcherHandler*);
Network3BackendDispatcherHandler* 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 domains-with-varying-command-sizes.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/NeverDestroyed.h>
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
#include "TestAlternateBackendDispatchers.h"
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
namespace Inspector {
Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { }
Network3BackendDispatcherHandler::~Network3BackendDispatcherHandler() { }
Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
{
return adoptRef(*new Network1BackendDispatcher(backendDispatcher, agent));
}
Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
: SupplementalBackendDispatcher(backendDispatcher)
, m_agent(agent)
{
m_backendDispatcher->registerDispatcherForDomain("Network1"_s, this);
}
void Network1BackendDispatcher::dispatch(long protocol_requestId, const String& protocol_method, Ref<JSON::Object>&& protocol_message)
{
Ref<Network1BackendDispatcher> protect(*this);
auto protocol_parameters = protocol_message->getObject("params"_s);
if (protocol_method == "loadResource1"_s) {
loadResource1(protocol_requestId, WTFMove(protocol_parameters));
return;
}
m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString("'Network1."_s, protocol_method, "' was not found"_s));
}
void Network1BackendDispatcher::loadResource1(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource1(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource1();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
Ref<Network3BackendDispatcher> Network3BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network3BackendDispatcherHandler* agent)
{
return adoptRef(*new Network3BackendDispatcher(backendDispatcher, agent));
}
Network3BackendDispatcher::Network3BackendDispatcher(BackendDispatcher& backendDispatcher, Network3BackendDispatcherHandler* agent)
: SupplementalBackendDispatcher(backendDispatcher)
, m_agent(agent)
{
m_backendDispatcher->registerDispatcherForDomain("Network3"_s, this);
}
void Network3BackendDispatcher::dispatch(long protocol_requestId, const String& protocol_method, Ref<JSON::Object>&& protocol_message)
{
Ref<Network3BackendDispatcher> protect(*this);
auto protocol_parameters = protocol_message->getObject("params"_s);
using CallHandler = void (Network3BackendDispatcher::*)(long protocol_requestId, RefPtr<JSON::Object>&& protocol_message);
using DispatchMap = HashMap<String, CallHandler>;
static NeverDestroyed<DispatchMap> dispatchMap = DispatchMap({
{ "loadResource1"_s, &Network3BackendDispatcher::loadResource1 },
{ "loadResource2"_s, &Network3BackendDispatcher::loadResource2 },
{ "loadResource3"_s, &Network3BackendDispatcher::loadResource3 },
{ "loadResource4"_s, &Network3BackendDispatcher::loadResource4 },
{ "loadResource5"_s, &Network3BackendDispatcher::loadResource5 },
{ "loadResource6"_s, &Network3BackendDispatcher::loadResource6 },
{ "loadResource7"_s, &Network3BackendDispatcher::loadResource7 },
});
auto findResult = dispatchMap->find(protocol_method);
if (findResult == dispatchMap->end()) {
m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString("'Network3."_s, protocol_method, "' was not found"_s));
return;
}
((*this).*findResult->value)(protocol_requestId, WTFMove(protocol_parameters));
}
void Network3BackendDispatcher::loadResource1(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource1(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource1();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
void Network3BackendDispatcher::loadResource2(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource2(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource2();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
void Network3BackendDispatcher::loadResource3(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource3(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource3();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
void Network3BackendDispatcher::loadResource4(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource4(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource4();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
void Network3BackendDispatcher::loadResource5(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource5(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource5();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
void Network3BackendDispatcher::loadResource6(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource6(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource6();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
void Network3BackendDispatcher::loadResource7(long protocol_requestId, RefPtr<JSON::Object>&&)
{
#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
if (m_alternateDispatcher) {
m_alternateDispatcher->loadResource7(protocol_requestId);
return;
}
#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
auto result = m_agent->loadResource7();
if (!result) {
ASSERT(!result.error().isEmpty());
m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, result.error());
return;
}
auto protocol_jsonMessage = JSON::Object::create();
m_backendDispatcher->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
}
} // namespace Inspector
### End File: TestBackendDispatchers.cpp
### Begin File: TestFrontendDispatchers.h
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
* Copyright (C) 2013-2016 Apple Inc. All rights reserved.
* Copyright (C) 2014 University of Washington. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#pragma once
#include "TestProtocolObjects.h"
#include <wtf/JSONValues.h>
#include <wtf/Optional.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 domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#include "config.h"
#include "TestFrontendDispatchers.h"
#include <JavaScriptCore/InspectorFrontendRouter.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 domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#pragma once
#include <JavaScriptCore/InspectorProtocolTypes.h>
#include <wtf/JSONValues.h>
#include <wtf/Optional.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
namespace Protocol {
// Typedefs.
namespace Network2 {
/* Unique loader identifier. */
using LoaderId = String;
} // Network2
// End of typedefs.
} // 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 domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#include "config.h"
#include "TestProtocolObjects.h"
#include <wtf/Assertions.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 domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
#include <wtf/RetainPtr.h>
@protocol TestProtocolNetwork1DomainHandler;
@protocol TestProtocolNetwork3DomainHandler;
namespace Inspector {
class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher {
WTF_MAKE_FAST_ALLOCATED;
public:
ObjCInspectorNetwork1BackendDispatcher(id<TestProtocolNetwork1DomainHandler> handler) { m_delegate = handler; }
void loadResource1(long protocol_requestId) final;
private:
RetainPtr<id<TestProtocolNetwork1DomainHandler>> m_delegate;
};
class ObjCInspectorNetwork3BackendDispatcher final : public AlternateNetwork3BackendDispatcher {
WTF_MAKE_FAST_ALLOCATED;
public:
ObjCInspectorNetwork3BackendDispatcher(id<TestProtocolNetwork3DomainHandler> handler) { m_delegate = handler; }
void loadResource1(long protocol_requestId) final;
void loadResource2(long protocol_requestId) final;
void loadResource3(long protocol_requestId) final;
void loadResource4(long protocol_requestId) final;
void loadResource5(long protocol_requestId) final;
void loadResource6(long protocol_requestId) final;
void loadResource7(long protocol_requestId) final;
private:
RetainPtr<id<TestProtocolNetwork3DomainHandler>> 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 domains-with-varying-command-sizes.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 ObjCInspectorNetwork1BackendDispatcher::loadResource1(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource1WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network1.loadResource1' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource1WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource1(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource1WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource1' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource1WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource2(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource2WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource2' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource2WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource3(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource3WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource3' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource3WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource4(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource4WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource4' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource4WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource5(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource5WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource5' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource5WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource6(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource6WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource6' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource6WithErrorCallback:errorCallback successCallback:successCallback];
}
void ObjCInspectorNetwork3BackendDispatcher::loadResource7(long protocol_requestId)
{
if (![m_delegate respondsToSelector:@selector(loadResource7WithErrorCallback:successCallback:)]) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::MethodNotFound, "'Network3.loadResource7' was not found"_s);
backendDispatcher()->sendPendingErrors();
return;
}
id errorCallback = ^(NSString *error) {
backendDispatcher()->reportProtocolError(protocol_requestId, BackendDispatcher::ServerError, error);
backendDispatcher()->sendPendingErrors();
};
id successCallback = ^{
auto protocol_jsonMessage = JSON::Object::create();
backendDispatcher()->sendResponse(protocol_requestId, WTFMove(protocol_jsonMessage), false);
};
[m_delegate loadResource7WithErrorCallback: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 domains-with-varying-command-sizes.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=setNetwork1Handler:) id<TestProtocolNetwork1DomainHandler> network1Handler;
@property (nonatomic, retain, setter=setNetwork3Handler:) id<TestProtocolNetwork3DomainHandler> network3Handler;
@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 domains-with-varying-command-sizes.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<TestProtocolNetwork1DomainHandler> _network1Handler;
id<TestProtocolNetwork3DomainHandler> _network3Handler;
}
- (instancetype)initWithController:(AugmentableInspectorController*)controller
{
self = [super init];
if (!self)
return nil;
ASSERT(controller);
_controller = controller;
return self;
}
- (void)dealloc
{
[_network1Handler release];
[_network3Handler release];
[super dealloc];
}
- (void)setNetwork1Handler:(id<TestProtocolNetwork1DomainHandler>)handler
{
if (handler == _network1Handler)
return;
[_network1Handler release];
_network1Handler = [handler retain];
auto alternateDispatcher = makeUnique<ObjCInspectorNetwork1BackendDispatcher>(handler);
auto alternateAgent = makeUnique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>("Network1"_s, *_controller, WTFMove(alternateDispatcher));
_controller->registerAlternateAgent(WTFMove(alternateAgent));
}
- (id<TestProtocolNetwork1DomainHandler>)network1Handler
{
return _network1Handler;
}
- (void)setNetwork3Handler:(id<TestProtocolNetwork3DomainHandler>)handler
{
if (handler == _network3Handler)
return;
[_network3Handler release];
_network3Handler = [handler retain];
auto alternateDispatcher = makeUnique<ObjCInspectorNetwork3BackendDispatcher>(handler);
auto alternateAgent = makeUnique<AlternateDispatchableAgent<Network3BackendDispatcher, AlternateNetwork3BackendDispatcher>>("Network3"_s, *_controller, WTFMove(alternateDispatcher));
_controller->registerAlternateAgent(WTFMove(alternateAgent));
}
- (id<TestProtocolNetwork3DomainHandler>)network3Handler
{
return _network3Handler;
}
@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 domains-with-varying-command-sizes.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 domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
#import <Foundation/Foundation.h>
#import <WebInspector/RWIProtocolJSONObject.h>
@protocol TestProtocolNetwork1DomainHandler <NSObject>
@optional
- (void)loadResource1WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
@end
@protocol TestProtocolNetwork3DomainHandler <NSObject>
@optional
- (void)loadResource1WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
- (void)loadResource2WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
- (void)loadResource3WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
- (void)loadResource4WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
- (void)loadResource5WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
- (void)loadResource6WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
- (void)loadResource7WithErrorCallback:(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 domains-with-varying-command-sizes.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 domains-with-varying-command-sizes.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);
} // 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 domains-with-varying-command-sizes.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;
@interface TestProtocolTypeConversions (Network2Domain)
+ (void)_parseLoaderId:(NSString **)outValue fromPayload:(id)payload;
@end
@implementation TestProtocolTypeConversions (Network2Domain)
+ (void)_parseLoaderId:(NSString **)outValue fromPayload:(id)payload
{
THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
*outValue = (NSString *)payload;
}
@end
### End File: TestProtocolTypeConversions.mm
### Begin File: TestProtocolTypes.mm
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
* Copyright (C) 2013-2016 Apple Inc. All rights reserved.
* Copyright (C) 2014 University of Washington. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.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