Chromium Code Reviews| 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) { } |