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

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: 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
« no previous file with comments | « Source/core/inspector/PageConsoleAgent.h ('k') | Source/core/inspector/WorkerConsoleAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageConsoleAgent.cpp
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp
index 56554dc8644f2f0e14e00f8ae366365501e08c7c..fe54ab90b50c059a303a4f9838b825a9fdd18cb5 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)
{
}
@@ -56,6 +59,7 @@ PageConsoleAgent::~PageConsoleAgent()
void PageConsoleAgent::trace(Visitor* visitor)
{
visitor->trace(m_inspectorDOMAgent);
+ visitor->trace(m_page);
InspectorConsoleAgent::trace(visitor);
}
@@ -65,6 +69,11 @@ void PageConsoleAgent::clearMessages(ErrorString* errorString)
InspectorConsoleAgent::clearMessages(errorString);
}
+ConsoleMessageStorage* PageConsoleAgent::messageStorage()
+{
+ return m_page->deprecatedLocalMainFrame()->console().messageStorage();
+}
+
class InspectableNode FINAL : public InjectedScriptHost::InspectableObject {
public:
explicit InspectableNode(Node* node) : m_node(node) { }
« no previous file with comments | « Source/core/inspector/PageConsoleAgent.h ('k') | Source/core/inspector/WorkerConsoleAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698