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

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.h

Issue 1286343003: DevTools: make InspectorDebuggerAgent aggregate V8DebuggerAgent instead of inheriting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed dgozman's comments Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 13 matching lines...) Expand all
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef InspectorDebuggerAgent_h 30 #ifndef InspectorDebuggerAgent_h
31 #define InspectorDebuggerAgent_h 31 #define InspectorDebuggerAgent_h
32 32
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/inspector/InspectorBaseAgent.h"
34 #include "core/inspector/V8DebuggerAgent.h" 35 #include "core/inspector/V8DebuggerAgent.h"
35 36
36 namespace blink { 37 namespace blink {
37 38
38 class CORE_EXPORT InspectorDebuggerAgent 39 class CORE_EXPORT InspectorDebuggerAgent
39 : public V8DebuggerAgent 40 : public InspectorBaseAgent<InspectorDebuggerAgent, InspectorFrontend::Debug ger>
41 , public InspectorBackendDispatcher::DebuggerCommandHandler
40 , public V8DebuggerAgent::Client { 42 , public V8DebuggerAgent::Client {
41 public: 43 public:
42 ~InspectorDebuggerAgent() override; 44 ~InspectorDebuggerAgent() override;
43 45
46 // InspectorBackendDispatcher::DebuggerCommandHandler implementation.
44 void enable(ErrorString*) override; 47 void enable(ErrorString*) override;
48 void disable(ErrorString*) override;
49 void setBreakpointsActive(ErrorString*, bool inActive) override;
50 void setSkipAllPauses(ErrorString*, bool inSkipped) override;
51 void setBreakpointByUrl(ErrorString*, int inLineNumber, const String* inUrl, const String* inUrlRegex, const int* inColumnNumber, const String* inCondition, TypeBuilder::Debugger::BreakpointId* outBreakpointId, RefPtr<TypeBuilder::Array <TypeBuilder::Debugger::Location>>& outLocations) override;
52 void setBreakpoint(ErrorString*, const RefPtr<JSONObject>& inLocation, const String* inCondition, TypeBuilder::Debugger::BreakpointId* outBreakpointId, RefP tr<TypeBuilder::Debugger::Location>& outActualLocation) override;
53 void removeBreakpoint(ErrorString*, const String& inBreakpointId) override;
54 void continueToLocation(ErrorString*, const RefPtr<JSONObject>& inLocation, const bool* inInterstatementLocation) override;
55 void stepOver(ErrorString*) override;
56 void stepInto(ErrorString*) override;
57 void stepOut(ErrorString*) override;
58 void pause(ErrorString*) override;
59 void resume(ErrorString*) override;
60 void stepIntoAsync(ErrorString*) override;
61 void searchInContent(ErrorString*, const String& inScriptId, const String& i nQuery, const bool* inCaseSensitive, const bool* inIsRegex, RefPtr<TypeBuilder:: Array<TypeBuilder::Debugger::SearchMatch>>& outResult) override;
62 void canSetScriptSource(ErrorString*, bool* outResult) override;
63 void setScriptSource(ErrorString*, RefPtr<TypeBuilder::Debugger::SetScriptSo urceError>& errorData, const String& inScriptId, const String& inScriptSource, c onst bool* inPreview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame >>& optOutCallFrames, TypeBuilder::OptOutput<bool>* optOutStackChanged, RefPtr<T ypeBuilder::Debugger::StackTrace>& optOutAsyncStackTrace) override;
64 void restartFrame(ErrorString*, const String& inCallFrameId, RefPtr<TypeBuil der::Array<TypeBuilder::Debugger::CallFrame>>& outCallFrames, RefPtr<TypeBuilder ::Debugger::StackTrace>& optOutAsyncStackTrace) override;
65 void getScriptSource(ErrorString*, const String& inScriptId, String* outScri ptSource) override;
66 void getFunctionDetails(ErrorString*, const String& inFunctionId, RefPtr<Typ eBuilder::Debugger::FunctionDetails>& outDetails) override;
67 void getGeneratorObjectDetails(ErrorString*, const String& inObjectId, RefPt r<TypeBuilder::Debugger::GeneratorObjectDetails>& outDetails) override;
68 void getCollectionEntries(ErrorString*, const String& inObjectId, RefPtr<Typ eBuilder::Array<TypeBuilder::Debugger::CollectionEntry>>& outEntries) override;
69 void setPauseOnExceptions(ErrorString*, const String& inState) override;
70 void evaluateOnCallFrame(ErrorString*, const String& inCallFrameId, const St ring& inExpression, const String* inObjectGroup, const bool* inIncludeCommandLin eAPI, const bool* inDoNotPauseOnExceptionsAndMuteConsole, const bool* inReturnBy Value, const bool* inGeneratePreview, RefPtr<TypeBuilder::Runtime::RemoteObject> & outResult, TypeBuilder::OptOutput<bool>* optOutWasThrown, RefPtr<TypeBuilder:: Debugger::ExceptionDetails>& optOutExceptionDetails) override;
71 void compileScript(ErrorString*, const String& inExpression, const String& i nSourceURL, bool inPersistScript, const int* inExecutionContextId, TypeBuilder:: OptOutput<TypeBuilder::Debugger::ScriptId>* optOutScriptId, RefPtr<TypeBuilder:: Debugger::ExceptionDetails>& optOutExceptionDetails) override;
72 void runScript(ErrorString*, const String& inScriptId, const int* inExecutio nContextId, const String* inObjectGroup, const bool* inDoNotPauseOnExceptionsAnd MuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& outResult, RefPtr<TypeB uilder::Debugger::ExceptionDetails>& optOutExceptionDetails) override;
73 void setVariableValue(ErrorString*, int inScopeNumber, const String& inVaria bleName, const RefPtr<JSONObject>& inNewValue, const String* inCallFrameId, cons t String* inFunctionObjectId) override;
74 void getStepInPositions(ErrorString*, const String& inCallFrameId, RefPtr<Ty peBuilder::Array<TypeBuilder::Debugger::Location>>& optOutStepInPositions) overr ide;
75 void getBacktrace(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Debug ger::CallFrame>>& outCallFrames, RefPtr<TypeBuilder::Debugger::StackTrace>& optO utAsyncStackTrace) override;
76 void skipStackFrames(ErrorString*, const String* inScript, const bool* inSki pContentScripts) override;
77 void setAsyncCallStackDepth(ErrorString*, int inMaxDepth) override;
78 void enablePromiseTracker(ErrorString*, const bool* inCaptureStacks) overrid e;
79 void disablePromiseTracker(ErrorString*) override;
80 void getPromiseById(ErrorString*, int inPromiseId, const String* inObjectGro up, RefPtr<TypeBuilder::Runtime::RemoteObject>& outPromise) override;
81 void flushAsyncOperationEvents(ErrorString*) override;
82 void setAsyncOperationBreakpoint(ErrorString*, int inOperationId) override;
83 void removeAsyncOperationBreakpoint(ErrorString*, int inOperationId) overrid e;
45 84
46 // V8DebuggerAgent::Client implementation. 85 // V8DebuggerAgent::Client implementation.
47 void debuggerAgentEnabled() override; 86 void debuggerAgentEnabled() override;
48 void debuggerAgentDisabled() override; 87 void debuggerAgentDisabled() override;
49 88
89 // Called by InspectorInstrumentation.
90 bool isPaused();
91 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsol e();
92 void didFireTimer();
93 void didHandleEvent();
94 void scriptExecutionBlockedByCSP(const String& directiveText);
95 void willCallFunction(const DevToolsFunctionInfo&);
96 void didCallFunction();
97 void willEvaluateScript();
98 void didEvaluateScript();
99
100 // InspectorBaseAgent overrides.
101 void init() override;
102 void setFrontend(InspectorFrontend*) override;
103 void clearFrontend() override;
104 void restore() override;
105
106 V8DebuggerAgent* v8DebuggerAgent() const { return m_v8DebuggerAgent.get(); }
107
50 protected: 108 protected:
51 InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*, int contextGroup Id); 109 InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*, int contextGroup Id);
110
111 OwnPtr<V8DebuggerAgent> m_v8DebuggerAgent;
52 }; 112 };
53 113
54 } // namespace blink 114 } // namespace blink
55 115
56 116
57 #endif // !defined(InspectorDebuggerAgent_h) 117 #endif // !defined(InspectorDebuggerAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMDebuggerAgent.cpp ('k') | Source/core/inspector/InspectorDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698