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

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

Issue 464293002: [DevTools] ConsoleMessage storage moved from ConsoleAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@remove-can-generate
Patch Set: Rebased Created 6 years, 4 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/PageConsoleAgent.cpp
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp
index 56554dc8644f2f0e14e00f8ae366365501e08c7c..b4537e1b2d2024e45e0b3581014b28d9cb5c289e 100644
--- a/Source/core/inspector/PageConsoleAgent.cpp
+++ b/Source/core/inspector/PageConsoleAgent.cpp
@@ -34,15 +34,18 @@
#include "core/dom/Node.h"
#include "core/dom/NodeTraversal.h"
#include "core/dom/shadow/ShadowRoot.h"
+#include "core/frame/FrameConsole.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/InjectedScriptManager.h"
#include "core/inspector/InspectorDOMAgent.h"
+#include "core/page/Page.h"
namespace blink {
-PageConsoleAgent::PageConsoleAgent(InjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent, InspectorTimelineAgent* timelineAgent, InspectorTracingAgent* tracingAgent)
+PageConsoleAgent::PageConsoleAgent(InjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent, InspectorTimelineAgent* timelineAgent, InspectorTracingAgent* tracingAgent, Page* page)
: InspectorConsoleAgent(timelineAgent, tracingAgent, injectedScriptManager)
, m_inspectorDOMAgent(domAgent)
+ , m_page(page)
{
}
@@ -93,4 +96,12 @@ void PageConsoleAgent::addInspectedNode(ErrorString* errorString, int nodeId)
m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(new InspectableNode(node)));
}
+ConsoleMessageStorage* PageConsoleAgent::messageStorage()
+{
+ Frame* frame = m_page->mainFrame();
+ if (frame->isLocalFrame())
+ return toLocalFrame(frame)->console().messageStorage();
+ return nullptr;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698