JSRemoteInspector.cpp [plain text]
#include "config.h"
#include "JSRemoteInspector.h"
#include "JSGlobalObjectConsoleClient.h"
#include <wtf/ProcessID.h>
#if ENABLE(REMOTE_INSPECTOR)
#include "RemoteInspector.h"
#endif
using namespace Inspector;
static bool remoteInspectionEnabledByDefault = true;
void JSRemoteInspectorDisableAutoStart(void)
{
#if ENABLE(REMOTE_INSPECTOR)
RemoteInspector::startDisabled();
#endif
}
void JSRemoteInspectorStart(void)
{
#if ENABLE(REMOTE_INSPECTOR)
RemoteInspector::singleton();
#endif
}
void JSRemoteInspectorSetParentProcessInformation(ProcessID pid, const uint8_t* auditData, size_t auditLength)
{
#if ENABLE(REMOTE_INSPECTOR) && PLATFORM(COCOA)
RetainPtr<CFDataRef> auditDataRef = adoptCF(CFDataCreate(kCFAllocatorDefault, auditData, auditLength));
RemoteInspector::singleton().setParentProcessInformation(pid, auditDataRef);
#else
UNUSED_PARAM(pid);
UNUSED_PARAM(auditData);
UNUSED_PARAM(auditLength);
#endif
}
void JSRemoteInspectorSetLogToSystemConsole(bool logToSystemConsole)
{
JSGlobalObjectConsoleClient::setLogToSystemConsole(logToSystemConsole);
}
bool JSRemoteInspectorGetInspectionEnabledByDefault(void)
{
return remoteInspectionEnabledByDefault;
}
void JSRemoteInspectorSetInspectionEnabledByDefault(bool enabledByDefault)
{
remoteInspectionEnabledByDefault = enabledByDefault;
}