summaryrefslogtreecommitdiff
path: root/Source/WebCore/inspector/InspectorDOMStorageAgent.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/inspector/InspectorDOMStorageAgent.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/inspector/InspectorDOMStorageAgent.h')
-rw-r--r--Source/WebCore/inspector/InspectorDOMStorageAgent.h54
1 files changed, 25 insertions, 29 deletions
diff --git a/Source/WebCore/inspector/InspectorDOMStorageAgent.h b/Source/WebCore/inspector/InspectorDOMStorageAgent.h
index 5ad2b7e11..7a96bf5e3 100644
--- a/Source/WebCore/inspector/InspectorDOMStorageAgent.h
+++ b/Source/WebCore/inspector/InspectorDOMStorageAgent.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 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
@@ -10,7 +11,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -26,63 +27,58 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InspectorDOMStorageAgent_h
-#define InspectorDOMStorageAgent_h
+#pragma once
#include "InspectorWebAgentBase.h"
-#include "InspectorWebBackendDispatchers.h"
#include "StorageArea.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
+#include <inspector/InspectorBackendDispatchers.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
-class InspectorArray;
-class InspectorDOMStorageFrontendDispatcher;
+class DOMStorageFrontendDispatcher;
}
namespace WebCore {
class Frame;
class InspectorPageAgent;
-class InstrumentingAgents;
class Page;
class SecurityOrigin;
class Storage;
typedef String ErrorString;
-class InspectorDOMStorageAgent : public InspectorAgentBase, public Inspector::InspectorDOMStorageBackendDispatcherHandler {
+class InspectorDOMStorageAgent final : public InspectorAgentBase, public Inspector::DOMStorageBackendDispatcherHandler {
+ WTF_MAKE_FAST_ALLOCATED;
public:
- InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*);
- ~InspectorDOMStorageAgent();
+ InspectorDOMStorageAgent(WebAgentContext&, InspectorPageAgent*);
+ virtual ~InspectorDOMStorageAgent();
- 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 getDOMStorageItems(ErrorString*, const RefPtr<Inspector::InspectorObject>& storageId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Array<String>>>& items) override;
- virtual void setDOMStorageItem(ErrorString*, const RefPtr<Inspector::InspectorObject>& storageId, const String& key, const String& value) override;
- virtual void removeDOMStorageItem(ErrorString*, const RefPtr<Inspector::InspectorObject>& storageId, const String& key) override;
+ void enable(ErrorString&) override;
+ void disable(ErrorString&) override;
+ void getDOMStorageItems(ErrorString&, const Inspector::InspectorObject& storageId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::Array<String>>>& items) override;
+ void setDOMStorageItem(ErrorString&, const Inspector::InspectorObject& storageId, const String& key, const String& value) override;
+ void removeDOMStorageItem(ErrorString&, const Inspector::InspectorObject& storageId, const String& key) override;
// Called from the injected script.
String storageId(Storage*);
- PassRefPtr<Inspector::TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bool isLocalStorage);
+ RefPtr<Inspector::Protocol::DOMStorage::StorageId> storageId(SecurityOrigin*, bool isLocalStorage);
- // Called from InspectorInstrumentation
- void didDispatchDOMStorageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Page*);
+ // InspectorInstrumentation
+ void didDispatchDOMStorageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*);
private:
- PassRefPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<Inspector::InspectorObject>&, Frame*&);
+ RefPtr<StorageArea> findStorageArea(ErrorString&, const Inspector::InspectorObject&, Frame*&);
- InspectorPageAgent* m_pageAgent;
- std::unique_ptr<Inspector::InspectorDOMStorageFrontendDispatcher> m_frontendDispatcher;
- RefPtr<Inspector::InspectorDOMStorageBackendDispatcher> m_backendDispatcher;
- bool m_enabled;
+ std::unique_ptr<Inspector::DOMStorageFrontendDispatcher> m_frontendDispatcher;
+ RefPtr<Inspector::DOMStorageBackendDispatcher> m_backendDispatcher;
+ InspectorPageAgent* m_pageAgent { nullptr };
+
+ bool m_enabled { false };
};
} // namespace WebCore
-
-#endif // !defined(InspectorDOMStorageAgent_h)