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

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
Index: Source/core/inspector/PageConsoleAgent.cpp
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp
index 56554dc8644f2f0e14e00f8ae366365501e08c7c..f349520407783637813171c40898152302ad9346 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)
{
}
@@ -65,6 +68,13 @@ void PageConsoleAgent::clearMessages(ErrorString* errorString)
InspectorConsoleAgent::clearMessages(errorString);
}
+ConsoleMessageStorage* PageConsoleAgent::messageStorage()
+{
+ Frame* frame = m_page->mainFrame();
aandrey 2014/08/26 08:56:42 m_page->deprecatedLocalMainFrame() ?
kozyatinskiy1 2014/08/26 09:39:29 Done.
+ ASSERT(frame->isLocalFrame());
+ return toLocalFrame(frame)->console().messageStorage();
+}
+
class InspectableNode FINAL : public InjectedScriptHost::InspectableObject {
public:
explicit InspectableNode(Node* node) : m_node(node) { }

Powered by Google App Engine
This is Rietveld 408576698