ITMLKit Inspector: Data Bindings / Associated Data for nodes
[WebKit-https.git] / Source / WebCore / inspector / InstrumentingAgents.cpp
index 1290b82..b5886c4 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2014, 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
 #include "config.h"
 #include "InstrumentingAgents.h"
 
-#if ENABLE(INSPECTOR)
-
-#include "InspectorController.h"
-#include "Page.h"
-#include "WorkerContext.h"
-#include "WorkerInspectorController.h"
-#include <wtf/MainThread.h>
 
 namespace WebCore {
 
-InstrumentingAgents* instrumentationForPage(Page* page)
+using namespace Inspector;
+
+InstrumentingAgents::InstrumentingAgents(InspectorEnvironment& environment)
+    : m_environment(environment)
 {
-    ASSERT(isMainThread());
-    if (InspectorController* controller = page->inspectorController())
-        return controller->m_instrumentingAgents.get();
-    return 0;
 }
 
-#if ENABLE(WORKERS)
-InstrumentingAgents* instrumentationForWorkerContext(WorkerContext* workerContext)
+void InstrumentingAgents::reset()
 {
-    if (WorkerInspectorController* controller = workerContext->workerInspectorController())
-        return controller->m_instrumentingAgents.get();
-    return 0;
-}
+    m_inspectorAgent = nullptr;
+    m_inspectorPageAgent = nullptr;
+    m_inspectorCSSAgent = nullptr;
+    m_inspectorLayerTreeAgent = nullptr;
+    m_inspectorWorkerAgent = nullptr;
+    m_webConsoleAgent = nullptr;
+    m_inspectorDOMAgent = nullptr;
+    m_inspectorNetworkAgent = nullptr;
+    m_pageRuntimeAgent = nullptr;
+    m_inspectorTimelineAgent = nullptr;
+    m_persistentInspectorTimelineAgent = nullptr;
+    m_inspectorDOMStorageAgent = nullptr;
+#if ENABLE(RESOURCE_USAGE)
+    m_inspectorCPUProfilerAgent = nullptr;
+    m_inspectorMemoryAgent = nullptr;
 #endif
+    m_inspectorDatabaseAgent = nullptr;
+    m_inspectorApplicationCacheAgent = nullptr;
+    m_inspectorDebuggerAgent = nullptr;
+    m_pageDebuggerAgent = nullptr;
+    m_pageHeapAgent = nullptr;
+    m_inspectorDOMDebuggerAgent = nullptr;
+    m_inspectorCanvasAgent = nullptr;
+}
 
 } // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)