Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1111)

Unified Diff: Source/core/inspector/InspectorInstrumentation.cpp

Issue 892693006: Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorInstrumentation.cpp
diff --git a/Source/core/inspector/InspectorInstrumentation.cpp b/Source/core/inspector/InspectorInstrumentation.cpp
index 4029db903331a586f9b287da8479a64df5113755..ccc9b2800731f0053f027e7a95542f28f325ab59 100644
--- a/Source/core/inspector/InspectorInstrumentation.cpp
+++ b/Source/core/inspector/InspectorInstrumentation.cpp
@@ -195,9 +195,11 @@
return 0;
}
-InstrumentingAgents* instrumentingAgentsFor(LocalFrame* frame)
-{
- return frame ? frame->instrumentingAgents() : nullptr;
+InstrumentingAgents* instrumentingAgentsFor(Page* page)
+{
+ if (!page)
+ return 0;
+ return instrumentationForPage(page);
}
InstrumentingAgents* instrumentingAgentsFor(EventTarget* eventTarget)
@@ -217,6 +219,11 @@
if (!workerGlobalScope)
return 0;
return instrumentationForWorkerGlobalScope(workerGlobalScope);
+}
+
+InstrumentingAgents* instrumentingAgentsFor(FrameHost* host)
+{
+ return instrumentationForPage(&host->page());
}
InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ExecutionContext* context)
@@ -247,6 +254,12 @@
const char CallbackName[] = "callbackName";
};
+InstrumentingAgents* instrumentationForPage(Page* page)
+{
+ ASSERT(isMainThread());
+ return page->inspectorController().m_instrumentingAgents.get();
+}
+
InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
{
if (WorkerInspectorController* controller = workerGlobalScope->workerInspectorController())
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698