summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/inspector/InspectorAgentBase.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/JavaScriptCore/inspector/InspectorAgentBase.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/inspector/InspectorAgentBase.h')
-rw-r--r--Source/JavaScriptCore/inspector/InspectorAgentBase.h46
1 files changed, 35 insertions, 11 deletions
diff --git a/Source/JavaScriptCore/inspector/InspectorAgentBase.h b/Source/JavaScriptCore/inspector/InspectorAgentBase.h
index f6b6c55cb..4edf78305 100644
--- a/Source/JavaScriptCore/inspector/InspectorAgentBase.h
+++ b/Source/JavaScriptCore/inspector/InspectorAgentBase.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2013, 2015 Apple Inc. All Rights Reserved.
* Copyright (C) 2011 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,27 +24,53 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InspectorAgentBase_h
-#define InspectorAgentBase_h
+#pragma once
#include <wtf/text/WTFString.h>
+namespace JSC {
+class JSGlobalObject;
+}
+
namespace Inspector {
-class InspectorBackendDispatcher;
-class InspectorFrontendChannel;
+class BackendDispatcher;
+class FrontendRouter;
+class InjectedScriptManager;
+class InspectorEnvironment;
+
+struct AgentContext {
+ InspectorEnvironment& environment;
+ InjectedScriptManager& injectedScriptManager;
+ FrontendRouter& frontendRouter;
+ BackendDispatcher& backendDispatcher;
+};
+
+struct JSAgentContext : public AgentContext {
+ JSAgentContext(AgentContext& context, JSC::JSGlobalObject& globalObject)
+ : AgentContext(context)
+ , inspectedGlobalObject(globalObject)
+ {
+ }
-enum class InspectorDisconnectReason {
+ JSC::JSGlobalObject& inspectedGlobalObject;
+};
+
+enum class DisconnectReason {
InspectedTargetDestroyed,
InspectorDestroyed
};
class InspectorAgentBase {
+ WTF_MAKE_FAST_ALLOCATED;
public:
virtual ~InspectorAgentBase() { }
- virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) = 0;
- virtual void willDestroyFrontendAndBackend(InspectorDisconnectReason reason) = 0;
+ String domainName() const { return m_name; }
+
+ virtual void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) = 0;
+ virtual void willDestroyFrontendAndBackend(DisconnectReason) = 0;
+ virtual void discardValues() { }
virtual void discardAgent() { }
protected:
@@ -55,7 +81,5 @@ protected:
String m_name;
};
-
-} // namespace Inspector
-#endif // !defined(InspectorAgentBase_h)
+} // namespace Inspector