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

Unified Diff: Source/core/inspector/ScriptDebugListener.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
Index: Source/core/inspector/ScriptDebugListener.h
diff --git a/Source/core/inspector/ScriptDebugListener.h b/Source/core/inspector/ScriptDebugListener.h
index b3a9e933550a1e55e469a45702cc3fc2125d2f60..f8fb1fcba10bb946441985f7e4cdaf670e6ed4a1 100644
--- a/Source/core/inspector/ScriptDebugListener.h
+++ b/Source/core/inspector/ScriptDebugListener.h
@@ -32,6 +32,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "core/CoreExport.h"
+#include "core/inspector/V8Debugger.h"
#include "wtf/Forward.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
@@ -41,74 +42,11 @@ namespace blink {
class ExecutionContext;
class ScriptValue;
-enum CompileResult { CompileSuccess, CompileError };
-
class CORE_EXPORT ScriptDebugListener {
public:
- class Script {
- 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
- };
-
- struct ParsedScript {
- String scriptId;
- Script script;
- CompileResult compileResult;
- };
-
virtual ~ScriptDebugListener() { }
-
- virtual void didParseSource(const ParsedScript&) = 0;
- virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection) = 0;
+ virtual void didParseSource(const V8Debugger::ParsedScript&) = 0;
+ virtual V8Debugger::SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection) = 0;
virtual void didContinue() = 0;
virtual bool v8AsyncTaskEventsEnabled() const = 0;
virtual void didReceiveV8AsyncTaskEvent(ScriptState*, const String& eventType, const String& eventName, int id) = 0;

Powered by Google App Engine
This is Rietveld 408576698