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

Unified Diff: Source/WebCore/inspector/InspectorInstrumentation.cpp

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 7 years, 8 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/WebCore/inspector/InspectorInstrumentation.cpp
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
index 699ed25c385214ceee25fc441e2b6906c38fedbd..caae59994936ba0120212c7f6dd99799ab5e96f8 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -29,9 +29,6 @@
*/
#include "config.h"
-
-#if ENABLE(INSPECTOR)
-
#include "InspectorInstrumentation.h"
#include "CSSRule.h"
@@ -160,12 +157,10 @@ void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgen
pageAgent->didClearWindowObjectInWorld(frame, world);
if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent())
inspectorAgent->didClearWindowObjectInWorld(frame, world);
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (PageDebuggerAgent* debuggerAgent = instrumentingAgents->pageDebuggerAgent()) {
if (pageAgent && world == mainThreadNormalWorld() && frame == pageAgent->mainFrame())
debuggerAgent->didClearMainFrameWindowObject();
}
-#endif
if (PageRuntimeAgent* pageRuntimeAgent = instrumentingAgents->pageRuntimeAgent()) {
if (world == mainThreadNormalWorld())
pageRuntimeAgent->didCreateMainWorldContext(frame);
@@ -174,57 +169,45 @@ void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgen
bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents* instrumentingAgents)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
return debuggerAgent->isPaused();
-#endif
return false;
}
void InspectorInstrumentation::willInsertDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* parent)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->willInsertDOMNode(parent);
-#endif
}
void InspectorInstrumentation::didInsertDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node)
{
if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent())
domAgent->didInsertDOMNode(node);
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->didInsertDOMNode(node);
-#endif
}
void InspectorInstrumentation::willRemoveDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->willRemoveDOMNode(node);
-#endif
}
void InspectorInstrumentation::didRemoveDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->didRemoveDOMNode(node);
-#endif
if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent())
domAgent->didRemoveDOMNode(node);
}
void InspectorInstrumentation::willModifyDOMAttrImpl(InstrumentingAgents* instrumentingAgents, Element* element, const AtomicString& oldValue, const AtomicString& newValue)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->willModifyDOMAttr(element);
if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent())
domAgent->willModifyDOMAttr(element, oldValue, newValue);
-#endif
}
void InspectorInstrumentation::didModifyDOMAttrImpl(InstrumentingAgents* instrumentingAgents, Element* element, const AtomicString& name, const AtomicString& value)
@@ -243,10 +226,8 @@ void InspectorInstrumentation::didInvalidateStyleAttrImpl(InstrumentingAgents* i
{
if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent())
domAgent->didInvalidateStyleAttr(node);
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->didInvalidateStyleAttr(node);
-#endif
}
void InspectorInstrumentation::frameWindowDiscardedImpl(InstrumentingAgents* instrumentingAgents, DOMWindow* window)
@@ -332,10 +313,8 @@ void InspectorInstrumentation::characterDataModifiedImpl(InstrumentingAgents* in
void InspectorInstrumentation::willSendXMLHttpRequestImpl(InstrumentingAgents* instrumentingAgents, const String& url)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->willSendXMLHttpRequest(url);
-#endif
}
void InspectorInstrumentation::didScheduleResourceRequestImpl(InstrumentingAgents* instrumentingAgents, const String& url, Frame* frame)
@@ -842,10 +821,8 @@ void InspectorInstrumentation::scriptImportedImpl(InstrumentingAgents* instrumen
void InspectorInstrumentation::scriptExecutionBlockedByCSPImpl(InstrumentingAgents* instrumentingAgents, const String& directiveText)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
debuggerAgent->scriptExecutionBlockedByCSP(directiveText);
-#endif
}
void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier)
@@ -1014,20 +991,16 @@ void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* inst
{
if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
consoleAgent->addMessageToConsole(source, type, level, message, callStack, requestIdentifier);
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
debuggerAgent->addMessageToConsole(source, type);
-#endif
}
void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
{
if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
consoleAgent->addMessageToConsole(source, type, level, message, state, arguments, requestIdentifier);
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
debuggerAgent->addMessageToConsole(source, type);
-#endif
}
void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier)
@@ -1067,7 +1040,6 @@ void InspectorInstrumentation::consoleTimeStampImpl(InstrumentingAgents* instrum
}
}
-#if ENABLE(JAVASCRIPT_DEBUGGER)
void InspectorInstrumentation::addStartProfilingMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, const String& title, unsigned lineNumber, const String& sourceURL)
{
if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent())
@@ -1095,7 +1067,6 @@ bool InspectorInstrumentation::profilerEnabledImpl(InstrumentingAgents* instrume
return profilerAgent->enabled();
return false;
}
-#endif
#if ENABLE(SQL_DATABASE)
void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr<Database> database, const String& domain, const String& name, const String& version)
@@ -1135,10 +1106,8 @@ void InspectorInstrumentation::willEvaluateWorkerScript(WorkerContext* workerCon
InstrumentingAgents* instrumentingAgents = instrumentationForWorkerContext(workerContext);
if (!instrumentingAgents)
return;
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (WorkerRuntimeAgent* runtimeAgent = instrumentingAgents->workerRuntimeAgent())
runtimeAgent->pauseWorkerContext(workerContext);
-#endif
}
void InspectorInstrumentation::workerContextTerminatedImpl(InstrumentingAgents* instrumentingAgents, WorkerContextProxy* proxy)
@@ -1241,18 +1210,14 @@ bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scri
void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* instrumentingAgents, bool isDOMEvent, const String& eventName, bool synchronous)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents->inspectorDOMDebuggerAgent())
domDebuggerAgent->pauseOnNativeEventIfNeeded(isDOMEvent, eventName, synchronous);
-#endif
}
void InspectorInstrumentation::cancelPauseOnNativeEvent(InstrumentingAgents* instrumentingAgents)
{
-#if ENABLE(JAVASCRIPT_DEBUGGER)
if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
debuggerAgent->cancelPauseOnNextStatement();
-#endif
}
void InspectorInstrumentation::didRequestAnimationFrameImpl(InstrumentingAgents* instrumentingAgents, int callbackId, Frame* frame)
@@ -1396,4 +1361,3 @@ const char PageId[] = "pageId";
} // namespace WebCore
-#endif // !ENABLE(INSPECTOR)
« no previous file with comments | « Source/WebCore/inspector/InspectorInstrumentation.h ('k') | Source/WebCore/inspector/InspectorLayerTreeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698