summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/inspector/InspectorDatabaseAgent.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/inspector/InspectorDatabaseAgent.h
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/inspector/InspectorDatabaseAgent.h')
-rw-r--r--Source/WebCore/inspector/InspectorDatabaseAgent.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/Source/WebCore/inspector/InspectorDatabaseAgent.h b/Source/WebCore/inspector/InspectorDatabaseAgent.h
index 4ad3e62..7e42211 100644
--- a/Source/WebCore/inspector/InspectorDatabaseAgent.h
+++ b/Source/WebCore/inspector/InspectorDatabaseAgent.h
@@ -39,32 +39,41 @@ class Database;
class InspectorArray;
class InspectorDatabaseResource;
class InspectorFrontend;
+class InstrumentingAgents;
+
+typedef String ErrorString;
class InspectorDatabaseAgent {
public:
class FrontendProvider;
- typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap;
-
- static PassOwnPtr<InspectorDatabaseAgent> create(DatabaseResourcesMap* databaseResources, InspectorFrontend* frontend)
+ static PassOwnPtr<InspectorDatabaseAgent> create(InstrumentingAgents* instrumentingAgents)
{
- return adoptPtr(new InspectorDatabaseAgent(databaseResources, frontend));
+ return adoptPtr(new InspectorDatabaseAgent(instrumentingAgents));
}
+ ~InspectorDatabaseAgent();
+
+ void setFrontend(InspectorFrontend*);
+ void clearFrontend();
- virtual ~InspectorDatabaseAgent();
+ void clearResources();
// Called from the front-end.
- void getDatabaseTableNames(long databaseId, RefPtr<InspectorArray>* names);
- void executeSQL(long databaseId, const String& query, bool* success, long* transactionId);
+ void getDatabaseTableNames(ErrorString* error, long databaseId, RefPtr<InspectorArray>* names);
+ void executeSQL(ErrorString* error, long databaseId, const String& query, bool* success, long* transactionId);
// Called from the injected script.
- Database* databaseForId(long databaseId);
- void selectDatabase(Database* database);
+ long databaseId(Database*);
+ void didOpenDatabase(PassRefPtr<Database>, const String& domain, const String& name, const String& version);
private:
- InspectorDatabaseAgent(DatabaseResourcesMap*, InspectorFrontend*);
+ explicit InspectorDatabaseAgent(InstrumentingAgents*);
+
+ Database* databaseForId(long databaseId);
- DatabaseResourcesMap* m_databaseResources;
+ InstrumentingAgents* m_instrumentingAgents;
+ typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap;
+ DatabaseResourcesMap m_resources;
RefPtr<FrontendProvider> m_frontendProvider;
};