diff options
Diffstat (limited to 'Source/WebCore/inspector/InspectorIndexedDBAgent.h')
-rw-r--r-- | Source/WebCore/inspector/InspectorIndexedDBAgent.h | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/Source/WebCore/inspector/InspectorIndexedDBAgent.h b/Source/WebCore/inspector/InspectorIndexedDBAgent.h index d071a004f..8ec4c017c 100644 --- a/Source/WebCore/inspector/InspectorIndexedDBAgent.h +++ b/Source/WebCore/inspector/InspectorIndexedDBAgent.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2012 Google Inc. All rights reserved. + * Copyright (C) 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -28,14 +29,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef InspectorIndexedDBAgent_h -#define InspectorIndexedDBAgent_h +#pragma once -#if ENABLE(INSPECTOR) && ENABLE(INDEXED_DATABASE) +#if ENABLE(INDEXED_DATABASE) #include "InspectorWebAgentBase.h" -#include "InspectorWebBackendDispatchers.h" -#include <wtf/PassOwnPtr.h> +#include <inspector/InspectorBackendDispatchers.h> #include <wtf/text/WTFString.h> namespace Inspector { @@ -48,29 +47,29 @@ class InspectorPageAgent; typedef String ErrorString; -class InspectorIndexedDBAgent : public InspectorAgentBase, public Inspector::InspectorIndexedDBBackendDispatcherHandler { +class InspectorIndexedDBAgent final : public InspectorAgentBase, public Inspector::IndexedDBBackendDispatcherHandler { + WTF_MAKE_FAST_ALLOCATED; public: - InspectorIndexedDBAgent(InstrumentingAgents*, Inspector::InjectedScriptManager*, InspectorPageAgent*); - ~InspectorIndexedDBAgent(); + InspectorIndexedDBAgent(WebAgentContext&, InspectorPageAgent*); + virtual ~InspectorIndexedDBAgent(); - virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override; - virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override; + void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override; + void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override; // Called from the front-end. - virtual void enable(ErrorString*) override; - virtual void disable(ErrorString*) override; - virtual void requestDatabaseNames(ErrorString*, const String& securityOrigin, PassRefPtr<RequestDatabaseNamesCallback>) override; - virtual void requestDatabase(ErrorString*, const String& securityOrigin, const String& databaseName, PassRefPtr<RequestDatabaseCallback>) override; - virtual void requestData(ErrorString*, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, const RefPtr<Inspector::InspectorObject>* keyRange, PassRefPtr<RequestDataCallback>) override; - virtual void clearObjectStore(ErrorString*, const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, PassRefPtr<ClearObjectStoreCallback>) 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; - InspectorPageAgent* m_pageAgent; - RefPtr<Inspector::InspectorIndexedDBBackendDispatcher> m_backendDispatcher; + Inspector::InjectedScriptManager& m_injectedScriptManager; + RefPtr<Inspector::IndexedDBBackendDispatcher> m_backendDispatcher; + InspectorPageAgent* m_pageAgent { nullptr }; }; } // namespace WebCore -#endif // ENABLE(INSPECTOR) && ENABLE(INDEXED_DATABASE) -#endif // !defined(InspectorIndexedDBAgent_h) +#endif // ENABLE(INDEXED_DATABASE) |