Web Inspector: CodeGeneratorInspector.py: switch Inspector, Memory and Database domains to typed API
https://bugs.webkit.org/show_bug.cgi?id=82958
Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-04-02
Reviewed by Yury Semikhatsky.
Client code is switched to typed API (all InspectorObject and InspectorArray types are replaced with
generated types from TypeBuilder according to Inspector.json).
Missing array of InspectorValues specialization is added.
* inspector/CodeGeneratorInspector.py:
* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::inspectImpl):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::inspect):
* inspector/InspectorAgent.h:
(InspectorAgent):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore):
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
(InspectorDatabaseAgent):
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
(InspectorMemoryAgent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/inspector/InspectorDatabaseResource.cpp b/Source/WebCore/inspector/InspectorDatabaseResource.cpp
index 678541c..0f46538 100644
--- a/Source/WebCore/inspector/InspectorDatabaseResource.cpp
+++ b/Source/WebCore/inspector/InspectorDatabaseResource.cpp
@@ -58,11 +58,11 @@
void InspectorDatabaseResource::bind(InspectorFrontend::Database* frontend)
{
- RefPtr<InspectorObject> jsonObject = InspectorObject::create();
- jsonObject->setString("id", m_id);
- jsonObject->setString("domain", m_domain);
- jsonObject->setString("name", m_name);
- jsonObject->setString("version", m_version);
+ RefPtr<TypeBuilder::Database::Database> jsonObject = TypeBuilder::Database::Database::create()
+ .setId(m_id)
+ .setDomain(m_domain)
+ .setName(m_name)
+ .setVersion(m_version);
frontend->addDatabase(jsonObject);
}