Index: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h |
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h |
index 5ba65b67b2cece7191965bcecde075ce18c58efa..56fe51540c04b9c224927973867d0ff59ef5b2fb 100644 |
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h |
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h |
@@ -90,6 +90,9 @@ public: |
DECLARE_VIRTUAL_TRACE(); |
private: |
+ class BlobLoader; |
+ class Message; |
+ |
enum MessageType { |
MessageTypeText, |
MessageTypeBlob, |
@@ -99,32 +102,11 @@ private: |
MessageTypeClose, |
}; |
- struct Message { |
- explicit Message(const CString&); |
- explicit Message(PassRefPtr<BlobDataHandle>); |
- explicit Message(PassRefPtr<DOMArrayBuffer>); |
- // For WorkerWebSocketChannel |
- explicit Message(PassOwnPtr<Vector<char>>, MessageType); |
- // Close message |
- Message(unsigned short code, const String& reason); |
- |
- MessageType type; |
- |
- CString text; |
- RefPtr<BlobDataHandle> blobDataHandle; |
- RefPtr<DOMArrayBuffer> arrayBuffer; |
- OwnPtr<Vector<char>> vectorData; |
- unsigned short code; |
- String reason; |
- }; |
- |
struct ReceivedMessage { |
bool isMessageText; |
Vector<char> data; |
}; |
- class BlobLoader; |
- |
DocumentWebSocketChannel(Document*, WebSocketChannelClient*, const String&, unsigned, WebSocketHandle*); |
void sendInternal(WebSocketHandle::MessageType, const char* data, size_t totalSize, uint64_t* consumedBufferedAmount); |
void processSendQueue(); |
@@ -145,7 +127,7 @@ private: |
void didStartClosingHandshake(WebSocketHandle*) override; |
// Methods for BlobLoader. |
- void didFinishLoadingBlob(PassRefPtr<DOMArrayBuffer>); |
+ void didFinishLoadingBlob(DOMArrayBuffer*); |
void didFailLoadingBlob(FileError::ErrorCode); |
// m_handle is a handle of the connection. |
@@ -159,7 +141,7 @@ private: |
// m_identifier > 0 means calling scriptContextExecution() returns a Document. |
unsigned long m_identifier; |
Member<BlobLoader> m_blobLoader; |
- Deque<OwnPtr<Message>> m_messages; |
+ HeapDeque<Member<Message>> m_messages; |
Vector<char> m_receivingMessageData; |
bool m_receivingMessageTypeIsText; |