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

Unified Diff: Source/core/inspector/V8Debugger.h

Issue 1224553008: [DevTools] Move Script and enums from ScriptDebugListener to V8Debugger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/ScriptDebugListener.cpp ('k') | Source/core/inspector/V8Debugger.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/inspector/ScriptDebugListener.cpp ('k') | Source/core/inspector/V8Debugger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698