Chromium Code Reviews| Index: Source/modules/websockets/WebSocket.h |
| diff --git a/Source/modules/websockets/WebSocket.h b/Source/modules/websockets/WebSocket.h |
| index f48c0b52c105b1372df80e3e0d47200ecb617a9b..29081cff2f30e9248cda33353fcc87d38c0f6b93 100644 |
| --- a/Source/modules/websockets/WebSocket.h |
| +++ b/Source/modules/websockets/WebSocket.h |
| @@ -51,7 +51,7 @@ namespace WebCore { |
| class Blob; |
| class ExceptionState; |
| -class WebSocket FINAL : public RefCountedWillBeRefCountedGarbageCollected<WebSocket>, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject, public WebSocketChannelClient { |
| +class WebSocket : public RefCountedWillBeRefCountedGarbageCollected<WebSocket>, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject, public WebSocketChannelClient { |
| DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<WebSocket>); |
| public: |
| static const char* subProtocolSeperator(); |
| @@ -125,6 +125,11 @@ public: |
| void trace(Visitor*); |
| + static bool isValidSubprotocolString(const String&); |
|
tyoshino (SeeGerritForStatus)
2014/05/27 01:12:14
use SubProtocol to align with subProtocolSeparator
yhirano
2014/05/27 03:30:07
I would rather prefer subprotocol over subProtocol
tyoshino (SeeGerritForStatus)
2014/05/27 11:51:23
OK. As far as they're consistent, I'm fine.
|
| + |
| +protected: |
| + explicit WebSocket(ExecutionContext*); |
| + |
| private: |
| // FIXME: This should inherit WebCore::EventQueue. |
| class EventQueue FINAL : public RefCountedWillBeGarbageCollectedFinalized<EventQueue> { |
| @@ -176,7 +181,11 @@ private: |
| WebSocketSendTypeMax, |
| }; |
| - explicit WebSocket(ExecutionContext*); |
| + // This function is virtual for unittests. |
| + virtual PassRefPtrWillBeRawPtr<WebSocketChannel> createChannel(ExecutionContext* context, WebSocketChannelClient* client) |
| + { |
| + return WebSocketChannel::create(context, client); |
|
tyoshino (SeeGerritForStatus)
2014/05/27 01:12:14
We might want to move contents of WebSocketChannel
yhirano
2014/05/27 03:30:07
Done.
|
| + } |
| // Adds a console message with JSMessageSource and ErrorMessageLevel. |
| void logError(const String& message); |