Chromium Code Reviews| Index: Source/core/inspector/V8Debugger.h |
| diff --git a/Source/core/inspector/V8Debugger.h b/Source/core/inspector/V8Debugger.h |
| index 3f3aaaf6364acc4f3e0e5c36d0c2764ae2bb455b..5e35c7e17ec377fc38e6d7831757ec0e75ac2a43 100644 |
| --- a/Source/core/inspector/V8Debugger.h |
| +++ b/Source/core/inspector/V8Debugger.h |
| @@ -34,7 +34,6 @@ |
| #include "core/CoreExport.h" |
| #include "core/InspectorTypeBuilder.h" |
| #include "core/inspector/ScriptBreakpoint.h" |
| -#include "core/inspector/ScriptDebugListener.h" |
| #include "platform/heap/Handle.h" |
| #include "wtf/Forward.h" |
| @@ -51,6 +50,71 @@ class JavaScriptCallFrame; |
| class CORE_EXPORT V8Debugger : public NoBaseWillBeGarbageCollectedFinalized<V8Debugger> { |
| WTF_MAKE_NONCOPYABLE(V8Debugger); |
| public: |
| + class Script { |
|
yurys
2015/07/07 14:13:45
As discussed offline I'd rather we moved this clas
|
| + public: |
| + Script(); |
| + |
| + String url() const { return m_url; } |
| + bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } |
| + String sourceURL() const; |
| + String sourceMappingURL() const { return m_sourceMappingURL; } |
| + String source() const { return m_source; } |
| + int startLine() const { return m_startLine; } |
| + int startColumn() const { return m_startColumn; } |
| + int endLine() const { return m_endLine; } |
| + int endColumn() const { return m_endColumn; } |
| + bool isContentScript() const { return m_isContentScript; } |
| + bool isInternalScript() const { return m_isInternalScript; } |
| + |
| + bool getBlackboxedState(unsigned blackboxGeneration, bool* isBlackboxed) const; |
| + void setBlackboxedState(unsigned blackboxGeneration, bool isBlackboxed); |
| + |
| + Script& setURL(const String&); |
| + Script& setSourceURL(const String&); |
| + Script& setSourceMappingURL(const String&); |
| + Script& setSource(const String&); |
| + Script& setStartLine(int); |
| + Script& setStartColumn(int); |
| + Script& setEndLine(int); |
| + Script& setEndColumn(int); |
| + Script& setIsContentScript(bool); |
| + Script& setIsInternalScript(bool); |
| + |
| + private: |
| + String m_url; |
| + String m_sourceURL; |
| + String m_sourceMappingURL; |
| + String m_source; |
| + int m_startLine; |
| + int m_startColumn; |
| + int m_endLine; |
| + int m_endColumn; |
| + bool m_isContentScript; |
| + bool m_isInternalScript; |
| + // Used from outside for caching. |
| + bool m_isBlackboxedURL; |
| + unsigned m_blackboxGeneration; |
| + }; |
| + |
| + enum SkipPauseRequest { |
| + NoSkip, |
| + Continue, |
| + StepInto, |
| + StepOut, |
| + StepFrame |
| + }; |
| + |
| + enum CompileResult { |
| + CompileSuccess, |
| + CompileError |
| + }; |
| + |
| + struct ParsedScript { |
| + String scriptId; |
| + Script script; |
| + CompileResult compileResult; |
| + }; |
| + |
| class CORE_EXPORT Client : public WillBeGarbageCollectedMixin { |
| public: |
| virtual ~Client() { } |
| @@ -78,7 +142,7 @@ public: |
| // Each script inherits debug data from v8::Context where it has been compiled. |
| // Only scripts whose debug data contains |contextDebugDataSubstring| substring will be reported. |
| // Passing empty string will result in reporting all scripts. |
| - void getCompiledScripts(const String& contextDebugDataSubstring, Vector<ScriptDebugListener::ParsedScript>&); |
| + void getCompiledScripts(const String& contextDebugDataSubstring, Vector<ParsedScript>&); |
| String setBreakpoint(const String& sourceID, const ScriptBreakpoint&, int* actualLineNumber, int* actualColumnNumber, bool interstatementLocation); |
| void removeBreakpoint(const String& breakpointId); |
| @@ -128,7 +192,7 @@ private: |
| v8::Local<v8::Context> debuggerContext() const; |
| void clearBreakpoints(); |
| - ScriptDebugListener::ParsedScript createParsedScript(v8::Local<v8::Object> sourceObject, CompileResult); |
| + ParsedScript createParsedScript(v8::Local<v8::Object> sourceObject, CompileResult); |
| static void breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| void handleProgramBreak(ScriptState* pausedScriptState, v8::Local<v8::Object> executionState, v8::Local<v8::Value> exception, v8::Local<v8::Array> hitBreakpoints, bool isPromiseRejection = false); |