| Index: Source/modules/websockets/WebSocketChannel.h
|
| diff --git a/Source/modules/websockets/WebSocketChannel.h b/Source/modules/websockets/WebSocketChannel.h
|
| index 49f14bfadf204d1c93fdb62b7f01f7169f054777..07c2c4b1f393c82629e4a8e7937149af8384f422 100644
|
| --- a/Source/modules/websockets/WebSocketChannel.h
|
| +++ b/Source/modules/websockets/WebSocketChannel.h
|
| @@ -31,9 +31,14 @@
|
| #ifndef WebSocketChannel_h
|
| #define WebSocketChannel_h
|
|
|
| +#include "core/inspector/ScriptCallFrame.h"
|
| +#include "core/inspector/ScriptCallStack.h"
|
| +#include "core/page/ConsoleTypes.h"
|
| #include "wtf/Forward.h"
|
| #include "wtf/Noncopyable.h"
|
| +#include "wtf/PassOwnPtr.h"
|
| #include "wtf/PassRefPtr.h"
|
| +#include "wtf/Vector.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -73,6 +78,15 @@ public:
|
| CloseEventCodeMaximumUserDefined = 4999
|
| };
|
|
|
| + class CallStackWrapper {
|
| + public:
|
| + CallStackWrapper(const Vector<ScriptCallFrame>& frames): m_frames(frames) { }
|
| + PassRefPtr<ScriptCallStack> callStack() { return ScriptCallStack::create(m_frames); }
|
| +
|
| + private:
|
| + Vector<ScriptCallFrame> m_frames;
|
| + };
|
| +
|
| virtual void connect(const KURL&, const String& protocol) = 0;
|
| virtual String subprotocol() = 0; // Will be available after didConnect() callback is invoked.
|
| virtual String extensions() = 0; // Will be available after didConnect() callback is invoked.
|
| @@ -82,7 +96,8 @@ public:
|
| virtual unsigned long bufferedAmount() const = 0;
|
| virtual void close(int code, const String& reason) = 0;
|
| // Log the reason text and close the connection. Will call didClose().
|
| - virtual void fail(const String& reason) = 0;
|
| + virtual void fail(const String& reason, MessageLevel) = 0;
|
| + virtual void fail(const String& reason, MessageLevel, PassOwnPtr<CallStackWrapper>) = 0;
|
| virtual void disconnect() = 0; // Will suppress didClose().
|
|
|
| virtual void suspend() = 0;
|
|
|