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

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

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.h
diff --git a/Source/core/inspector/InspectorInstrumentation.h b/Source/core/inspector/InspectorInstrumentation.h
index c0362806872208a3ece8be2c366cd087e5b36dc1..724a727857863e1f36f6cdf80c89773b2504a00e 100644
--- a/Source/core/inspector/InspectorInstrumentation.h
+++ b/Source/core/inspector/InspectorInstrumentation.h
@@ -54,6 +54,7 @@
class Document;
class EventTarget;
class ExecutionContext;
+class FrameHost;
class InspectorTimelineAgent;
class InstrumentingAgents;
class ThreadableLoaderClient;
@@ -100,6 +101,7 @@
InspectorTimelineAgent* retrieveTimelineAgent(const InspectorInstrumentationCookie&);
// Called from generated instrumentation code.
+InstrumentingAgents* instrumentingAgentsFor(Page*);
InstrumentingAgents* instrumentingAgentsFor(LocalFrame*);
InstrumentingAgents* instrumentingAgentsFor(EventTarget*);
InstrumentingAgents* instrumentingAgentsFor(ExecutionContext*);
@@ -108,6 +110,7 @@
InstrumentingAgents* instrumentingAgentsFor(RenderObject*);
InstrumentingAgents* instrumentingAgentsFor(Node*);
InstrumentingAgents* instrumentingAgentsFor(WorkerGlobalScope*);
+InstrumentingAgents* instrumentingAgentsFor(FrameHost*);
// Helper for the one above.
InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ExecutionContext*);
@@ -142,12 +145,17 @@
return context->isDocument() ? instrumentingAgentsFor(*toDocument(context)) : instrumentingAgentsForNonDocumentContext(context);
}
+inline InstrumentingAgents* instrumentingAgentsFor(LocalFrame* frame)
+{
+ return frame ? instrumentingAgentsFor(frame->page()) : 0;
+}
+
inline InstrumentingAgents* instrumentingAgentsFor(Document& document)
{
- LocalFrame* frame = document.frame();
- if (!frame && document.templateDocumentHost())
- frame = document.templateDocumentHost()->frame();
- return instrumentingAgentsFor(frame);
+ Page* page = document.page();
+ if (!page && document.templateDocumentHost())
+ page = document.templateDocumentHost()->page();
+ return instrumentingAgentsFor(page);
}
inline InstrumentingAgents* instrumentingAgentsFor(Document* document)
@@ -172,6 +180,8 @@
} // namespace InspectorInstrumentation
+InstrumentingAgents* instrumentationForPage(Page*);
+
InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope*);
} // namespace blink
« no previous file with comments | « Source/core/inspector/InspectorInspectorAgent.cpp ('k') | Source/core/inspector/InspectorInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698