InspectorJSONObject.cpp [plain text]
#include "config.h"
#include "InspectorJSONObject.h"
#if ENABLE(INSPECTOR)
#include "PlatformString.h"
#include "ScriptObject.h"
#include "ScriptState.h"
namespace WebCore {
InspectorJSONObject::InspectorJSONObject(ScriptState* scriptState)
: m_scriptState(scriptState)
{
m_scriptObject = ScriptObject::createNew(scriptState);
}
bool InspectorJSONObject::set(const String& name, const String& value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
bool InspectorJSONObject::set(const char* name, const ScriptObject& value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
bool InspectorJSONObject::set(const char* name, const InspectorJSONObject& value)
{
return set(name, value.scriptObject());
}
bool InspectorJSONObject::set(const char* name, const String& value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
bool InspectorJSONObject::set(const char* name, double value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
bool InspectorJSONObject::set(const char* name, long long value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
bool InspectorJSONObject::set(const char* name, int value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
bool InspectorJSONObject::set(const char* name, bool value)
{
return m_scriptObject.set(m_scriptState, name, value);
}
ScriptObject InspectorJSONObject::scriptObject() const
{
return m_scriptObject;
}
InspectorJSONObject InspectorJSONObject::createNew(ScriptState* scriptState)
{
return InspectorJSONObject(scriptState);
}
}
#endif // ENABLE(INSPECTOR)