| Index: sky/engine/core/inspector/ScriptDebugListener.h
|
| diff --git a/sky/engine/core/frame/FrameConsole.h b/sky/engine/core/inspector/ScriptDebugListener.h
|
| similarity index 52%
|
| copy from sky/engine/core/frame/FrameConsole.h
|
| copy to sky/engine/core/inspector/ScriptDebugListener.h
|
| index b2d9d4e2d46fbd9e828b576a5f0bba4546ba6cac..33474c29dd09b973951f82089da8aca86b9bb680 100644
|
| --- a/sky/engine/core/frame/FrameConsole.h
|
| +++ b/sky/engine/core/inspector/ScriptDebugListener.h
|
| @@ -1,5 +1,6 @@
|
| /*
|
| - * Copyright (C) 2013 Apple Inc. All rights reserved.
|
| + * Copyright (C) 2008 Apple Inc. All rights reserved.
|
| + * Copyright (C) 2010 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions
|
| @@ -26,56 +27,63 @@
|
| * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef FrameConsole_h
|
| -#define FrameConsole_h
|
| +#ifndef ScriptDebugListener_h
|
| +#define ScriptDebugListener_h
|
| +
|
|
|
| #include "bindings/core/v8/ScriptState.h"
|
| -#include "core/frame/ConsoleTypes.h"
|
| -#include "platform/heap/Handle.h"
|
| #include "wtf/Forward.h"
|
| -#include "wtf/PassOwnPtr.h"
|
| +#include "wtf/Vector.h"
|
| +#include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| -class ConsoleMessage;
|
| -class ConsoleMessageStorage;
|
| -class Document;
|
| -class FrameHost;
|
| -class ResourceResponse;
|
| -class ScriptCallStack;
|
| -
|
| -// FrameConsole takes per-frame console messages and routes them up through the FrameHost to the ChromeClient and Inspector.
|
| -// It's meant as an abstraction around ChromeClient calls and the way that Blink core/ can add messages to the console.
|
| -class FrameConsole final {
|
| - DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameConsole);
|
| -public:
|
| - static PassOwnPtr<FrameConsole> create(LocalFrame& frame)
|
| - {
|
| - return adoptPtr(new FrameConsole(frame));
|
| - }
|
| -
|
| - void addMessage(PassRefPtr<ConsoleMessage>);
|
| -
|
| - void reportResourceResponseReceived(Document*, unsigned long requestIdentifier, const ResourceResponse&);
|
| -
|
| - static String formatStackTraceString(const String& originalMessage, PassRefPtr<ScriptCallStack>);
|
| +class ExecutionContext;
|
| +class ScriptValue;
|
|
|
| - static void mute();
|
| - static void unmute();
|
| +enum CompileResult { CompileSuccess, CompileError };
|
|
|
| - ConsoleMessageStorage* messageStorage();
|
| - void clearMessages();
|
| -
|
| - void trace(Visitor*);
|
| -
|
| -private:
|
| - explicit FrameConsole(LocalFrame&);
|
| -
|
| - LocalFrame& m_frame;
|
| -
|
| - OwnPtr<ConsoleMessageStorage> m_consoleMessageStorage;
|
| +class ScriptDebugListener {
|
| +public:
|
| + class Script {
|
| + public:
|
| + Script()
|
| + : startLine(0)
|
| + , startColumn(0)
|
| + , endLine(0)
|
| + , endColumn(0)
|
| + , isContentScript(false)
|
| + {
|
| + }
|
| +
|
| + String url;
|
| + String sourceURL;
|
| + String sourceMappingURL;
|
| + String source;
|
| + int startLine;
|
| + int startColumn;
|
| + int endLine;
|
| + int endColumn;
|
| + bool isContentScript;
|
| + };
|
| +
|
| + enum SkipPauseRequest {
|
| + NoSkip,
|
| + Continue,
|
| + StepInto,
|
| + StepOut
|
| + };
|
| +
|
| + virtual ~ScriptDebugListener() { }
|
| +
|
| + virtual void didParseSource(const String& scriptId, const Script&, CompileResult) = 0;
|
| + virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints) = 0;
|
| + virtual void didContinue() = 0;
|
| + virtual void didReceiveV8AsyncTaskEvent(ExecutionContext*, const String& eventType, const String& eventName, int id) = 0;
|
| + virtual void didReceiveV8PromiseEvent(ScriptState*, v8::Handle<v8::Object> promise, v8::Handle<v8::Value> parentPromise, int status) = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // FrameConsole_h
|
| +
|
| +#endif // ScriptDebugListener_h
|
|
|