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

Unified Diff: Source/core/frame/LocalFrame.cpp

Issue 898593002: 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, 11 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/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index 59c68fb30f1656f1e87a4186e7e690d9dae676e4..fdf972a2b6c57e04725ee81a2f072a8fe6004658 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -51,6 +51,7 @@
#include "core/html/HTMLPlugInElement.h"
#include "core/inspector/ConsoleMessageStorage.h"
#include "core/inspector/InspectorInstrumentation.h"
+#include "core/inspector/InstrumentingAgents.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
@@ -220,6 +221,7 @@ LocalFrame::~LocalFrame()
void LocalFrame::trace(Visitor* visitor)
{
+ visitor->trace(m_instrumentingAgents);
yurys 2015/02/03 06:44:00 Should be guarded with the macro below.
pfeldman 2015/02/03 07:09:16 I think instrumenting agents is already oilpan-all
#if ENABLE(OILPAN)
visitor->trace(m_destructionObservers);
visitor->trace(m_loader);
@@ -423,6 +425,16 @@ LocalFrame* LocalFrame::localFrameRoot()
return curFrame;
}
+InstrumentingAgents* LocalFrame::instrumentingAgents()
+{
+ return m_instrumentingAgents.get();
yurys 2015/02/03 06:44:00 Why not "return host()->instrumentingAgents();" ?
pfeldman 2015/02/03 07:09:16 That's because in a subsequent change, we'll have
+}
+
+void LocalFrame::setInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
+{
+ m_instrumentingAgents = instrumentingAgents;
+}
+
bool LocalFrame::inScope(TreeScope* scope) const
{
ASSERT(scope);
@@ -814,6 +826,7 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
, m_pageZoomFactor(parentPageZoomFactor(this))
, m_textZoomFactor(parentTextZoomFactor(this))
, m_inViewSourceMode(false)
+ , m_instrumentingAgents(host->instrumentingAgents())
{
}

Powered by Google App Engine
This is Rietveld 408576698