InspectorIndexedDBAgent.h [plain text]
#ifndef InspectorIndexedDBAgent_h
#define InspectorIndexedDBAgent_h
#if ENABLE(INDEXED_DATABASE)
#include "InspectorWebAgentBase.h"
#include <inspector/InspectorBackendDispatchers.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
class InjectedScriptManager;
}
namespace WebCore {
class InspectorPageAgent;
typedef String ErrorString;
class InspectorIndexedDBAgent final : public InspectorAgentBase, public Inspector::IndexedDBBackendDispatcherHandler {
WTF_MAKE_FAST_ALLOCATED;
public:
InspectorIndexedDBAgent(WebAgentContext&, InspectorPageAgent*);
virtual ~InspectorIndexedDBAgent();
void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
void enable(ErrorString&) override;
void disable(ErrorString&) override;
void requestDatabaseNames(ErrorString&, const String& securityOrigin, Ref<RequestDatabaseNamesCallback>&&) override;
void requestDatabase(ErrorString&, const String& securityOrigin, const String& databaseName, Ref<RequestDatabaseCallback>&&) override;
void requestData(ErrorString&, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, const Inspector::InspectorObject* keyRange, Ref<RequestDataCallback>&&) override;
void clearObjectStore(ErrorString&, const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, Ref<ClearObjectStoreCallback>&&) override;
private:
Inspector::InjectedScriptManager& m_injectedScriptManager;
RefPtr<Inspector::IndexedDBBackendDispatcher> m_backendDispatcher;
InspectorPageAgent* m_pageAgent { nullptr };
};
}
#endif // ENABLE(INDEXED_DATABASE)
#endif // !defined(InspectorIndexedDBAgent_h)