Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // Protocol implementation | |
|
dgozman
2015/08/15 01:05:56
We usually write "InspectorBackendDispatcher::Debu
yurys
2015/08/17 17:15:06
Done.
| |
| 44 void enable(ErrorString*) override; | 47 void enable(ErrorString*) override; |
| 48 void disable(ErrorString*) override; | |
| 49 void setBreakpointsActive(ErrorString*, bool in_active) override; | |
| 50 void setSkipAllPauses(ErrorString*, bool in_skipped) override; | |
| 51 void setBreakpointByUrl(ErrorString*, int in_lineNumber, const String* in_ur l, const String* in_urlRegex, const int* in_columnNumber, const String* in_condi tion, TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<TypeBuilder: :Array<TypeBuilder::Debugger::Location>>& out_locations) override; | |
| 52 void setBreakpoint(ErrorString*, const RefPtr<JSONObject>& in_location, cons t String* in_condition, TypeBuilder::Debugger::BreakpointId* out_breakpointId, R efPtr<TypeBuilder::Debugger::Location>& out_actualLocation) override; | |
| 53 void removeBreakpoint(ErrorString*, const String& in_breakpointId) override; | |
| 54 void continueToLocation(ErrorString*, const RefPtr<JSONObject>& in_location, const bool* in_interstatementLocation) 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& in_scriptId, const String& in_query, const bool* in_caseSensitive, const bool* in_isRegex, RefPtr<TypeBuild er::Array<TypeBuilder::Debugger::SearchMatch>>& out_result) override; | |
| 62 void canSetScriptSource(ErrorString*, bool* out_result) override; | |
| 63 void setScriptSource(ErrorString*, RefPtr<TypeBuilder::Debugger::SetScriptSo urceError>& errorData, const String& in_scriptId, const String& in_scriptSource, const bool* in_preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFr ame>>& opt_out_callFrames, TypeBuilder::OptOutput<bool>* opt_out_stackChanged, R efPtr<TypeBuilder::Debugger::StackTrace>& opt_out_asyncStackTrace) override; | |
| 64 void restartFrame(ErrorString*, const String& in_callFrameId, RefPtr<TypeBui lder::Array<TypeBuilder::Debugger::CallFrame>>& out_callFrames, RefPtr<TypeBuild er::Debugger::StackTrace>& opt_out_asyncStackTrace) override; | |
| 65 void getScriptSource(ErrorString*, const String& in_scriptId, String* out_sc riptSource) override; | |
| 66 void getFunctionDetails(ErrorString*, const String& in_functionId, RefPtr<Ty peBuilder::Debugger::FunctionDetails>& out_details) override; | |
| 67 void getGeneratorObjectDetails(ErrorString*, const String& in_objectId, RefP tr<TypeBuilder::Debugger::GeneratorObjectDetails>& out_details) override; | |
| 68 void getCollectionEntries(ErrorString*, const String& in_objectId, RefPtr<Ty peBuilder::Array<TypeBuilder::Debugger::CollectionEntry>>& out_entries) override ; | |
| 69 void setPauseOnExceptions(ErrorString*, const String& in_state) override; | |
| 70 void evaluateOnCallFrame(ErrorString*, const String& in_callFrameId, const S tring& in_expression, const String* in_objectGroup, const bool* in_includeComman dLineAPI, const bool* in_doNotPauseOnExceptionsAndMuteConsole, const bool* in_re turnByValue, const bool* in_generatePreview, RefPtr<TypeBuilder::Runtime::Remote Object>& out_result, TypeBuilder::OptOutput<bool>* opt_out_wasThrown, RefPtr<Typ eBuilder::Debugger::ExceptionDetails>& opt_out_exceptionDetails) override; | |
| 71 void compileScript(ErrorString*, const String& in_expression, const String& in_sourceURL, bool in_persistScript, const int* in_executionContextId, TypeBuild er::OptOutput<TypeBuilder::Debugger::ScriptId>* opt_out_scriptId, RefPtr<TypeBui lder::Debugger::ExceptionDetails>& opt_out_exceptionDetails) override; | |
| 72 void runScript(ErrorString*, const String& in_scriptId, const int* in_execut ionContextId, const String* in_objectGroup, const bool* in_doNotPauseOnException sAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& out_result, RefPtr< TypeBuilder::Debugger::ExceptionDetails>& opt_out_exceptionDetails) override; | |
| 73 void setVariableValue(ErrorString*, int in_scopeNumber, const String& in_var iableName, const RefPtr<JSONObject>& in_newValue, const String* in_callFrameId, const String* in_functionObjectId) override; | |
| 74 void getStepInPositions(ErrorString*, const String& in_callFrameId, RefPtr<T ypeBuilder::Array<TypeBuilder::Debugger::Location>>& opt_out_stepInPositions) ov erride; | |
| 75 void getBacktrace(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Debug ger::CallFrame>>& out_callFrames, RefPtr<TypeBuilder::Debugger::StackTrace>& opt _out_asyncStackTrace) override; | |
| 76 void skipStackFrames(ErrorString*, const String* in_script, const bool* in_s kipContentScripts) override; | |
| 77 void setAsyncCallStackDepth(ErrorString*, int in_maxDepth) override; | |
| 78 void enablePromiseTracker(ErrorString*, const bool* in_captureStacks) overri de; | |
| 79 void disablePromiseTracker(ErrorString*) override; | |
| 80 void getPromiseById(ErrorString*, int in_promiseId, const String* in_objectG roup, RefPtr<TypeBuilder::Runtime::RemoteObject>& out_promise) override; | |
| 81 void flushAsyncOperationEvents(ErrorString*) override; | |
| 82 void setAsyncOperationBreakpoint(ErrorString*, int in_operationId) override; | |
| 83 void removeAsyncOperationBreakpoint(ErrorString*, int in_operationId) overri de; | |
| 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(); | |
|
dgozman
2015/08/15 01:05:56
I doubt that isPaused is called from instrumentati
yurys
2015/08/17 17:15:06
But nevertheless it is: https://code.google.com/p/
| |
| 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 bool getEditedScript(const String& url, String* content); | |
| 101 | |
| 102 // InspectorBaseAgent overrides. | |
| 103 void init() override; | |
| 104 void setFrontend(InspectorFrontend*) override; | |
| 105 void clearFrontend() override; | |
| 106 void restore() override; | |
| 107 | |
| 108 V8DebuggerAgent* v8DebuggerAgent() const { return m_debuggerAgent.get(); } | |
| 109 | |
| 50 protected: | 110 protected: |
| 51 InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*, int contextGroup Id); | 111 InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*, int contextGroup Id); |
| 112 | |
| 113 OwnPtr<V8DebuggerAgent> m_debuggerAgent; | |
| 52 }; | 114 }; |
| 53 | 115 |
| 54 } // namespace blink | 116 } // namespace blink |
| 55 | 117 |
| 56 | 118 |
| 57 #endif // !defined(InspectorDebuggerAgent_h) | 119 #endif // !defined(InspectorDebuggerAgent_h) |
| OLD | NEW |