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

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

Issue 300393002: Merge DevTools Refactor CL to Blink36 (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1985
Patch Set: PTAL Created 6 years, 6 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/PageDebuggerAgent.h ('k') | Source/core/inspector/PageRuntimeAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageDebuggerAgent.cpp
diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
index 4e737127e3170f66eebf6c7ca5065270d189b497..ec3b4e555ce3178a780fc59a3fdff167ea00e5d3 100644
--- a/Source/core/inspector/PageDebuggerAgent.cpp
+++ b/Source/core/inspector/PageDebuggerAgent.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "core/inspector/PageDebuggerAgent.h"
+#include "bindings/dart/DartScriptDebugServer.h"
#include "bindings/v8/DOMWrapperWorld.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/ScriptSourceCode.h"
@@ -44,17 +45,18 @@
namespace WebCore {
-PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(PageScriptDebugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(UnifiedScriptDebugServer* unifiedScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
{
- return adoptPtr(new PageDebuggerAgent(pageScriptDebugServer, pageAgent, injectedScriptManager, overlay));
+ return adoptPtr(new PageDebuggerAgent(unifiedScriptDebugServer, pageAgent, injectedScriptManager, overlay));
}
-PageDebuggerAgent::PageDebuggerAgent(PageScriptDebugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+PageDebuggerAgent::PageDebuggerAgent(UnifiedScriptDebugServer* unifiedScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
: InspectorDebuggerAgent(injectedScriptManager)
- , m_pageScriptDebugServer(pageScriptDebugServer)
+ , m_unifiedScriptDebugServer(unifiedScriptDebugServer)
, m_pageAgent(pageAgent)
, m_overlay(overlay)
{
+ ASSERT(m_unifiedScriptDebugServer);
m_overlay->overlayHost()->setListener(this);
}
@@ -76,17 +78,17 @@ void PageDebuggerAgent::disable()
void PageDebuggerAgent::startListeningScriptDebugServer()
{
- scriptDebugServer().addListener(this, m_pageAgent->page());
+ m_unifiedScriptDebugServer->addListener(this, m_pageAgent->page());
}
void PageDebuggerAgent::stopListeningScriptDebugServer()
{
- scriptDebugServer().removeListener(this, m_pageAgent->page());
+ m_unifiedScriptDebugServer->removeListener(this, m_pageAgent->page());
}
-PageScriptDebugServer& PageDebuggerAgent::scriptDebugServer()
+ScriptDebugServerBase& PageDebuggerAgent::scriptDebugServer()
{
- return *m_pageScriptDebugServer;
+ return *m_unifiedScriptDebugServer;
}
void PageDebuggerAgent::muteConsole()
@@ -111,13 +113,13 @@ void PageDebuggerAgent::overlaySteppedOver()
stepOver(&error, 0);
}
-InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
+InjectedScript& PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
{
if (!executionContextId) {
ScriptState* scriptState = V8ScriptState::forMainWorld(m_pageAgent->mainFrame());
return injectedScriptManager()->injectedScriptFor(scriptState);
}
- InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId(*executionContextId);
+ InjectedScript& injectedScript = injectedScriptManager()->injectedScriptForId(*executionContextId);
if (injectedScript.isEmpty())
*errorString = "Execution context with given id not found.";
return injectedScript;
@@ -144,15 +146,13 @@ void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame)
String PageDebuggerAgent::preprocessEventListener(LocalFrame* frame, const String& source, const String& url, const String& functionName)
{
ASSERT(frame);
- ASSERT(m_pageScriptDebugServer);
- return m_pageScriptDebugServer->preprocessEventListener(frame, source, url, functionName);
+ return m_unifiedScriptDebugServer->preprocessEventListener(frame, source, url, functionName);
}
PassOwnPtr<ScriptSourceCode> PageDebuggerAgent::preprocess(LocalFrame* frame, const ScriptSourceCode& sourceCode)
{
- ASSERT(m_pageScriptDebugServer);
ASSERT(frame);
- return m_pageScriptDebugServer->preprocess(frame, sourceCode);
+ return m_unifiedScriptDebugServer->preprocess(frame, sourceCode);
}
void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.h ('k') | Source/core/inspector/PageRuntimeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698