summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/inspector/InspectorAgentRegistry.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/inspector/InspectorAgentRegistry.h')
-rw-r--r--Source/JavaScriptCore/inspector/InspectorAgentRegistry.h38
1 files changed, 23 insertions, 15 deletions
diff --git a/Source/JavaScriptCore/inspector/InspectorAgentRegistry.h b/Source/JavaScriptCore/inspector/InspectorAgentRegistry.h
index 17d65e71a..7f7017c00 100644
--- a/Source/JavaScriptCore/inspector/InspectorAgentRegistry.h
+++ b/Source/JavaScriptCore/inspector/InspectorAgentRegistry.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,37 +24,45 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InspectorAgentRegistry_h
-#define InspectorAgentRegistry_h
+#pragma once
#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
namespace Inspector {
+class BackendDispatcher;
+class FrontendRouter;
class InspectorAgentBase;
-class InspectorBackendDispatcher;
-class InspectorFrontendChannel;
-enum class InspectorDisconnectReason;
-class JS_EXPORT_PRIVATE InspectorAgentRegistry {
+enum class DisconnectReason;
+
+class JS_EXPORT_PRIVATE AgentRegistry {
public:
- InspectorAgentRegistry();
+ AgentRegistry();
+ ~AgentRegistry();
void append(std::unique_ptr<InspectorAgentBase>);
- void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*);
- void willDestroyFrontendAndBackend(InspectorDisconnectReason reason);
- void discardAgents();
+ void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*);
+ void willDestroyFrontendAndBackend(DisconnectReason);
+ void discardValues();
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ void appendExtraAgent(std::unique_ptr<InspectorAgentBase>);
+ Vector<String> extraDomains() const { return m_extraDomains; }
+#endif
private:
// These are declared here to avoid MSVC from trying to create default iplementations which would
// involve generating a copy constructor and copy assignment operator for the Vector of std::unique_ptrs.
- InspectorAgentRegistry(const InspectorAgentRegistry&) = delete;
- InspectorAgentRegistry& operator=(const InspectorAgentRegistry&) = delete;
+ AgentRegistry(const AgentRegistry&) = delete;
+ AgentRegistry& operator=(const AgentRegistry&) = delete;
Vector<std::unique_ptr<InspectorAgentBase>> m_agents;
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ Vector<String> m_extraDomains;
+#endif
};
} // namespace Inspector
-
-#endif // !defined(InspectorAgentRegistry_h)