Commit c661a7f7 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.5.3+dfsg1

parent 6ee63a34
cmake_minimum_required(VERSION 2.8.8)
project(WebKit)
# -----------------------------------------------------------------------------
# Default library type
# -----------------------------------------------------------------------------
set(WTF_DIR "${CMAKE_SOURCE_DIR}/Source/WTF")
set(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/Source/JavaScriptCore")
set(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/Source/WebCore")
set(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit")
set(WEBKIT2_DIR "${CMAKE_SOURCE_DIR}/Source/WebKit2")
set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/Source/ThirdParty")
set(PLATFORM_DIR "${CMAKE_SOURCE_DIR}/Source/Platform")
set(TOOLS_DIR "${CMAKE_SOURCE_DIR}/Tools")
set(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
set(DERIVED_SOURCES_JAVASCRIPTCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore")
set(DERIVED_SOURCES_WEBCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebCore")
set(DERIVED_SOURCES_WEBKIT_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit")
set(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
set(DERIVED_SOURCES_WEBINSPECTORUI_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebInspectorUI")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
set(ENABLE_WEBCORE ON)
if (NOT DEFINED ENABLE_WEBKIT)
set(ENABLE_WEBKIT ON)
endif ()
if (NOT DEFINED ENABLE_TOOLS AND EXISTS ${TOOLS_DIR})
set(ENABLE_TOOLS ON)
endif ()
include(WebKitMacros)
include(WebKitFS)
include(WebKitHelpers)
include(WebKitFeatures)
# -----------------------------------------------------------------------------
# Determine which port will be built
# -----------------------------------------------------------------------------
set(ALL_PORTS Efl WinCE GTK AppleWin WinCairo Mac)
set(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
list(FIND ALL_PORTS ${PORT} RET)
if (${RET} EQUAL -1)
message(FATAL_ERROR "Please choose which WebKit port to build (one of ${ALL_PORTS})")
endif ()
string(TOLOWER ${PORT} WEBKIT_PORT_DIR)
# -----------------------------------------------------------------------------
# Find common packages (used by all ports)
# -----------------------------------------------------------------------------
find_package(BISON 2.3 REQUIRED)
if (!APPLE)
find_package(FLEX 2.5.34 REQUIRED)
endif ()
# TODO Enforce version requirement for gperf
find_package(Gperf 3.0.1 REQUIRED)
# TODO Enforce version requirement for perl
find_package(Perl 5.10.0 REQUIRED)
find_package(PythonInterp 2.6.0 REQUIRED)
find_package(Ruby 1.8.7)
# -----------------------------------------------------------------------------
# Determine the target processor
# -----------------------------------------------------------------------------
# Use MSVC_CXX_ARCHITECTURE_ID instead of CMAKE_SYSTEM_PROCESSOR when defined,
# since the later one just resolves to the host processor on Windows.
if (MSVC_CXX_ARCHITECTURE_ID)
string(TOLOWER ${MSVC_CXX_ARCHITECTURE_ID} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
else ()
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
endif ()
if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(WTF_CPU_ARM 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(WTF_CPU_ARM64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(WTF_CPU_MIPS 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4")
set(WTF_CPU_SH4 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64|x86_64|amd64)")
set(WTF_CPU_X86_64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
set(WTF_CPU_X86 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
set(WTF_CPU_PPC 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
set(WTF_CPU_PPC64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
set(WTF_CPU_PPC64LE 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390")
set(WTF_CPU_S390 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(WTF_CPU_S390X 1)
else ()
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
endif ()
# -----------------------------------------------------------------------------
# Determine the operating system
# -----------------------------------------------------------------------------
if (UNIX)
if (APPLE)
set(WTF_OS_MAC_OS_X 1)
else ()
set(WTF_OS_UNIX 1)
endif ()
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(WTF_OS_WINDOWS 1)
else ()
message(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
endif ()
# -----------------------------------------------------------------------------
# Default library types
# -----------------------------------------------------------------------------
option(SHARED_CORE "build JavaScriptCore and WebCore as shared libraries")
if (SHARED_CORE)
set(JavaScriptCore_LIBRARY_TYPE SHARED)
set(WebCore_LIBRARY_TYPE SHARED)
else ()
if (${PORT} STREQUAL GTK)
set(JavaScriptCore_LIBRARY_TYPE SHARED)
else ()
set(JavaScriptCore_LIBRARY_TYPE STATIC)
endif ()
set(WebCore_LIBRARY_TYPE STATIC)
endif ()
set(WebKit_LIBRARY_TYPE SHARED)
set(WebKit2_LIBRARY_TYPE SHARED)
set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
# -----------------------------------------------------------------------------
# Install JavaScript shell
# -----------------------------------------------------------------------------
option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
# -----------------------------------------------------------------------------
# Common options
#------------------------------------------------------------------------------
include(OptionsCommon)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# -----------------------------------------------------------------------------
# Port-specific options
# -----------------------------------------------------------------------------
include(Options${PORT})
# -----------------------------------------------------------------------------
# Enable API unit tests and create a target for the test runner
# -----------------------------------------------------------------------------
if (ENABLE_API_TESTS)
enable_testing()
endif ()
# -----------------------------------------------------------------------------
# Define packaging
# -----------------------------------------------------------------------------
include(WebKitPackaging)
# -----------------------------------------------------------------------------
# Add module directories
# -----------------------------------------------------------------------------
add_subdirectory(Source)
# -----------------------------------------------------------------------------
# Add tools
# -----------------------------------------------------------------------------
if (ENABLE_TOOLS)
add_subdirectory(Tools)
endif ()
This diff is collapsed.
// File is generated by JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py
// Copyright (c) 2013 Apple Inc. All Rights Reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef InspectorJSBackendDispatchers_h
#define InspectorJSBackendDispatchers_h
#include "InspectorJSTypeBuilders.h"
#include <inspector/InspectorBackendDispatcher.h>
#include <wtf/PassRefPtr.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
typedef String ErrorString;
class JS_EXPORT_PRIVATE InspectorDebuggerBackendDispatcherHandler {
public:
virtual void enable(ErrorString*) = 0;
virtual void disable(ErrorString*) = 0;
virtual void setBreakpointsActive(ErrorString*, bool in_active) = 0;
virtual void setBreakpointByUrl(ErrorString*, int in_lineNumber, const String* in_url, const String* in_urlRegex, const int* in_columnNumber, const RefPtr<Inspector::InspectorObject>* in_options, Inspector::TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::Location> >& out_locations, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier> >& out_breakpointActionIdentifiers) = 0;
virtual void setBreakpoint(ErrorString*, const RefPtr<Inspector::InspectorObject>& in_location, const RefPtr<Inspector::InspectorObject>* in_options, Inspector::TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<Inspector::TypeBuilder::Debugger::Location>& out_actualLocation, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier> >& out_breakpointActionIdentifiers) = 0;
virtual void removeBreakpoint(ErrorString*, const String& in_breakpointId) = 0;
virtual void continueToLocation(ErrorString*, const RefPtr<Inspector::InspectorObject>& in_location) = 0;
virtual void stepOver(ErrorString*) = 0;
virtual void stepInto(ErrorString*) = 0;
virtual void stepOut(ErrorString*) = 0;
virtual void pause(ErrorString*) = 0;
virtual void resume(ErrorString*) = 0;
virtual void searchInContent(ErrorString*, const String& in_scriptId, const String& in_query, const bool* in_caseSensitive, const bool* in_isRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch> >& out_result) = 0;
virtual void getScriptSource(ErrorString*, const String& in_scriptId, String* out_scriptSource) = 0;
virtual void getFunctionDetails(ErrorString*, const String& in_functionId, RefPtr<Inspector::TypeBuilder::Debugger::FunctionDetails>& out_details) = 0;
virtual void setPauseOnExceptions(ErrorString*, const String& in_state) = 0;
virtual void evaluateOnCallFrame(ErrorString*, const String& in_callFrameId, const String& in_expression, const String* in_objectGroup, const bool* in_includeCommandLineAPI, const bool* in_doNotPauseOnExceptionsAndMuteConsole, const bool* in_returnByValue, const bool* in_generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& out_result, Inspector::TypeBuilder::OptOutput<bool>* opt_out_wasThrown) = 0;
virtual void setOverlayMessage(ErrorString*, const String* in_message) = 0;
protected:
virtual ~InspectorDebuggerBackendDispatcherHandler();
};
class JS_EXPORT_PRIVATE InspectorInspectorBackendDispatcherHandler {
public:
virtual void enable(ErrorString*) = 0;
virtual void disable(ErrorString*) = 0;
protected:
virtual ~InspectorInspectorBackendDispatcherHandler();
};
class JS_EXPORT_PRIVATE InspectorRuntimeBackendDispatcherHandler {
public:
virtual void parse(ErrorString*, const String& in_source, Inspector::TypeBuilder::Runtime::SyntaxErrorType::Enum* out_result, Inspector::TypeBuilder::OptOutput<String>* opt_out_message, RefPtr<Inspector::TypeBuilder::Runtime::ErrorRange>& opt_out_range) = 0;
virtual void evaluate(ErrorString*, const String& in_expression, const String* in_objectGroup, const bool* in_includeCommandLineAPI, const bool* in_doNotPauseOnExceptionsAndMuteConsole, const int* in_contextId, const bool* in_returnByValue, const bool* in_generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& out_result, Inspector::TypeBuilder::OptOutput<bool>* opt_out_wasThrown) = 0;
virtual void callFunctionOn(ErrorString*, const String& in_objectId, const String& in_functionDeclaration, const RefPtr<Inspector::InspectorArray>* in_arguments, const bool* in_doNotPauseOnExceptionsAndMuteConsole, const bool* in_returnByValue, const bool* in_generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& out_result, Inspector::TypeBuilder::OptOutput<bool>* opt_out_wasThrown) = 0;
virtual void getProperties(ErrorString*, const String& in_objectId, const bool* in_ownProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor> >& out_result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor> >& opt_out_internalProperties) = 0;
virtual void releaseObject(ErrorString*, const String& in_objectId) = 0;
virtual void releaseObjectGroup(ErrorString*, const String& in_objectGroup) = 0;
virtual void run(ErrorString*) = 0;
virtual void enable(ErrorString*) = 0;
virtual void disable(ErrorString*) = 0;
protected:
virtual ~InspectorRuntimeBackendDispatcherHandler();
};
class JS_EXPORT_PRIVATE InspectorDebuggerBackendDispatcher final : public Inspector::InspectorSupplementalBackendDispatcher {
public:
static PassRefPtr<InspectorDebuggerBackendDispatcher> create(Inspector::InspectorBackendDispatcher*, InspectorDebuggerBackendDispatcherHandler*);
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) override;
private:
void enable(long callId, const Inspector::InspectorObject& message);
void disable(long callId, const Inspector::InspectorObject& message);
void setBreakpointsActive(long callId, const Inspector::InspectorObject& message);
void setBreakpointByUrl(long callId, const Inspector::InspectorObject& message);
void setBreakpoint(long callId, const Inspector::InspectorObject& message);
void removeBreakpoint(long callId, const Inspector::InspectorObject& message);
void continueToLocation(long callId, const Inspector::InspectorObject& message);
void stepOver(long callId, const Inspector::InspectorObject& message);
void stepInto(long callId, const Inspector::InspectorObject& message);
void stepOut(long callId, const Inspector::InspectorObject& message);
void pause(long callId, const Inspector::InspectorObject& message);
void resume(long callId, const Inspector::InspectorObject& message);
void searchInContent(long callId, const Inspector::InspectorObject& message);
void getScriptSource(long callId, const Inspector::InspectorObject& message);
void getFunctionDetails(long callId, const Inspector::InspectorObject& message);
void setPauseOnExceptions(long callId, const Inspector::InspectorObject& message);
void evaluateOnCallFrame(long callId, const Inspector::InspectorObject& message);
void setOverlayMessage(long callId, const Inspector::InspectorObject& message);
private:
InspectorDebuggerBackendDispatcher(Inspector::InspectorBackendDispatcher*, InspectorDebuggerBackendDispatcherHandler*);
InspectorDebuggerBackendDispatcherHandler* m_agent;
};
class JS_EXPORT_PRIVATE InspectorInspectorBackendDispatcher final : public Inspector::InspectorSupplementalBackendDispatcher {
public:
static PassRefPtr<InspectorInspectorBackendDispatcher> create(Inspector::InspectorBackendDispatcher*, InspectorInspectorBackendDispatcherHandler*);
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) override;
private:
void enable(long callId, const Inspector::InspectorObject& message);
void disable(long callId, const Inspector::InspectorObject& message);
private:
InspectorInspectorBackendDispatcher(Inspector::InspectorBackendDispatcher*, InspectorInspectorBackendDispatcherHandler*);
InspectorInspectorBackendDispatcherHandler* m_agent;
};
class JS_EXPORT_PRIVATE InspectorRuntimeBackendDispatcher final : public Inspector::InspectorSupplementalBackendDispatcher {
public:
static PassRefPtr<InspectorRuntimeBackendDispatcher> create(Inspector::InspectorBackendDispatcher*, InspectorRuntimeBackendDispatcherHandler*);
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) override;
private:
void parse(long callId, const Inspector::InspectorObject& message);
void evaluate(long callId, const Inspector::InspectorObject& message);
void callFunctionOn(long callId, const Inspector::InspectorObject& message);
void getProperties(long callId, const Inspector::InspectorObject& message);
void releaseObject(long callId, const Inspector::InspectorObject& message);
void releaseObjectGroup(long callId, const Inspector::InspectorObject& message);
void run(long callId, const Inspector::InspectorObject& message);
void enable(long callId, const Inspector::InspectorObject& message);
void disable(long callId, const Inspector::InspectorObject& message);
private:
InspectorRuntimeBackendDispatcher(Inspector::InspectorBackendDispatcher*, InspectorRuntimeBackendDispatcherHandler*);
InspectorRuntimeBackendDispatcherHandler* m_agent;
};
} // namespace Inspector
#endif // !defined(InspectorJSBackendDispatchers_h)
// File is generated by JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py
// Copyright (c) 2013 Apple Inc. All Rights Reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "InspectorJSFrontendDispatchers.h"
#if ENABLE(INSPECTOR)
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
void InspectorDebuggerFrontendDispatcher::globalObjectCleared()
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.globalObjectCleared"));
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorDebuggerFrontendDispatcher::scriptParsed(const Inspector::TypeBuilder::Debugger::ScriptId& scriptId, const String& url, int startLine, int startColumn, int endLine, int endColumn, const bool* const isContentScript, const String* const sourceMapURL, const bool* const hasSourceURL)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.scriptParsed"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setString(ASCIILiteral("scriptId"), scriptId);
paramsObject->setString(ASCIILiteral("url"), url);
paramsObject->setNumber(ASCIILiteral("startLine"), startLine);
paramsObject->setNumber(ASCIILiteral("startColumn"), startColumn);
paramsObject->setNumber(ASCIILiteral("endLine"), endLine);
paramsObject->setNumber(ASCIILiteral("endColumn"), endColumn);
if (isContentScript)
paramsObject->setBoolean(ASCIILiteral("isContentScript"), *isContentScript);
if (sourceMapURL)
paramsObject->setString(ASCIILiteral("sourceMapURL"), *sourceMapURL);
if (hasSourceURL)
paramsObject->setBoolean(ASCIILiteral("hasSourceURL"), *hasSourceURL);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorDebuggerFrontendDispatcher::scriptFailedToParse(const String& url, const String& scriptSource, int startLine, int errorLine, const String& errorMessage)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.scriptFailedToParse"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setString(ASCIILiteral("url"), url);
paramsObject->setString(ASCIILiteral("scriptSource"), scriptSource);
paramsObject->setNumber(ASCIILiteral("startLine"), startLine);
paramsObject->setNumber(ASCIILiteral("errorLine"), errorLine);
paramsObject->setString(ASCIILiteral("errorMessage"), errorMessage);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorDebuggerFrontendDispatcher::breakpointResolved(const Inspector::TypeBuilder::Debugger::BreakpointId& breakpointId, PassRefPtr<Inspector::TypeBuilder::Debugger::Location> location)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.breakpointResolved"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setString(ASCIILiteral("breakpointId"), breakpointId);
paramsObject->setValue(ASCIILiteral("location"), location);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorDebuggerFrontendDispatcher::paused(PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame> > callFrames, Reason::Enum reason, PassRefPtr<Inspector::InspectorObject> data)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.paused"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setValue(ASCIILiteral("callFrames"), callFrames);
paramsObject->setString(ASCIILiteral("reason"), Inspector::TypeBuilder::getJSEnumConstantValue(reason));
if (data)
paramsObject->setValue(ASCIILiteral("data"), data);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorDebuggerFrontendDispatcher::resumed()
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.resumed"));
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorDebuggerFrontendDispatcher::didSampleProbe(PassRefPtr<Inspector::TypeBuilder::Debugger::ProbeSample> sample)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.didSampleProbe"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setValue(ASCIILiteral("sample"), sample);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorInspectorFrontendDispatcher::evaluateForTestInFrontend(int testCallId, const String& script)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Inspector.evaluateForTestInFrontend"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setNumber(ASCIILiteral("testCallId"), testCallId);
paramsObject->setString(ASCIILiteral("script"), script);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorInspectorFrontendDispatcher::inspect(PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> object, PassRefPtr<Inspector::InspectorObject> hints)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Inspector.inspect"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setValue(ASCIILiteral("object"), object);
paramsObject->setValue(ASCIILiteral("hints"), hints);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorInspectorFrontendDispatcher::detached(const String& reason)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Inspector.detached"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setString(ASCIILiteral("reason"), reason);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorInspectorFrontendDispatcher::targetCrashed()
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Inspector.targetCrashed"));
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorRuntimeFrontendDispatcher::executionContextCreated(PassRefPtr<Inspector::TypeBuilder::Runtime::ExecutionContextDescription> context)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Runtime.executionContextCreated"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setValue(ASCIILiteral("context"), context);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
} // namespace Inspector
#endif // ENABLE(INSPECTOR)
// File is generated by JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py
// Copyright (c) 2013 Apple Inc. All Rights Reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef InspectorJSFrontendDispatchers_h
#define InspectorJSFrontendDispatchers_h
#include "InspectorJSTypeBuilders.h"
#include <inspector/InspectorFrontendChannel.h>
#include <inspector/InspectorValues.h>
#include <wtf/PassRefPtr.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
#if ENABLE(INSPECTOR)
class JS_EXPORT_PRIVATE InspectorDebuggerFrontendDispatcher {
public:
InspectorDebuggerFrontendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
void globalObjectCleared();
void scriptParsed(const Inspector::TypeBuilder::Debugger::ScriptId& scriptId, const String& url, int startLine, int startColumn, int endLine, int endColumn, const bool* const isContentScript, const String* const sourceMapURL, const bool* const hasSourceURL);
void scriptFailedToParse(const String& url, const String& scriptSource, int startLine, int errorLine, const String& errorMessage);
void breakpointResolved(const Inspector::TypeBuilder::Debugger::BreakpointId& breakpointId, PassRefPtr<Inspector::TypeBuilder::Debugger::Location> location);
// Named after parameter 'reason' while generating command/event paused.
struct Reason {
enum Enum {
XHR = 24,
DOM = 25,
EventListener = 26,
Exception = 27,
Assert = 28,
CSPViolation = 29,
Other = 30,
};
}; // struct Reason
void paused(PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame> > callFrames, Reason::Enum reason, PassRefPtr<Inspector::InspectorObject> data);
void resumed();
void didSampleProbe(PassRefPtr<Inspector::TypeBuilder::Debugger::ProbeSample> sample);
private:
InspectorFrontendChannel* m_inspectorFrontendChannel;
};
class JS_EXPORT_PRIVATE InspectorInspectorFrontendDispatcher {
public:
InspectorInspectorFrontendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
void evaluateForTestInFrontend(int testCallId, const String& script);
void inspect(PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> object, PassRefPtr<Inspector::InspectorObject> hints);
void detached(const String& reason);
void targetCrashed();
private:
InspectorFrontendChannel* m_inspectorFrontendChannel;
};
class JS_EXPORT_PRIVATE InspectorRuntimeFrontendDispatcher {
public:
InspectorRuntimeFrontendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
void executionContextCreated(PassRefPtr<Inspector::TypeBuilder::Runtime::ExecutionContextDescription> context);
private:
InspectorFrontendChannel* m_inspectorFrontendChannel;
};
#endif // ENABLE(INSPECTOR)
} // namespace Inspector
#endif // !defined(InspectorJSFrontendDispatchers_h)
// File is generated by JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py
// Copyright (c) 2013 Apple Inc. All Rights Reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "InspectorJSTypeBuilders.h"
#if ENABLE(INSPECTOR)