OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 return adoptRefWillBeRefCountedGarbageCollected(new NewWebSocketChannelI
mpl(context, client, sourceURL, lineNumber)); | 75 return adoptRefWillBeRefCountedGarbageCollected(new NewWebSocketChannelI
mpl(context, client, sourceURL, lineNumber)); |
76 } | 76 } |
77 virtual ~NewWebSocketChannelImpl(); | 77 virtual ~NewWebSocketChannelImpl(); |
78 | 78 |
79 // WebSocketChannel functions. | 79 // WebSocketChannel functions. |
80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; | 80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; |
81 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; | 81 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; |
82 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO
ffset, unsigned byteLength) OVERRIDE; | 82 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO
ffset, unsigned byteLength) OVERRIDE; |
83 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI
DE; | 83 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI
DE; |
84 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV
ERRIDE; | 84 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV
ERRIDE; |
85 virtual unsigned long bufferedAmount() const OVERRIDE; | |
86 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code | 85 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code |
87 // argument to omit payload. | 86 // argument to omit payload. |
88 virtual void close(int code, const String& reason) OVERRIDE; | 87 virtual void close(int code, const String& reason) OVERRIDE; |
89 virtual void fail(const String& reason, MessageLevel, const String&, unsigne
d lineNumber) OVERRIDE; | 88 virtual void fail(const String& reason, MessageLevel, const String&, unsigne
d lineNumber) OVERRIDE; |
90 virtual void disconnect() OVERRIDE; | 89 virtual void disconnect() OVERRIDE; |
91 | 90 |
92 virtual void suspend() OVERRIDE; | 91 virtual void suspend() OVERRIDE; |
93 virtual void resume() OVERRIDE; | 92 virtual void resume() OVERRIDE; |
94 | 93 |
95 virtual void trace(Visitor*) OVERRIDE; | 94 virtual void trace(Visitor*) OVERRIDE; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 KURL m_url; | 158 KURL m_url; |
160 // m_identifier > 0 means calling scriptContextExecution() returns a Documen
t. | 159 // m_identifier > 0 means calling scriptContextExecution() returns a Documen
t. |
161 unsigned long m_identifier; | 160 unsigned long m_identifier; |
162 OwnPtrWillBeMember<BlobLoader> m_blobLoader; | 161 OwnPtrWillBeMember<BlobLoader> m_blobLoader; |
163 Deque<OwnPtr<Message> > m_messages; | 162 Deque<OwnPtr<Message> > m_messages; |
164 Vector<char> m_receivingMessageData; | 163 Vector<char> m_receivingMessageData; |
165 | 164 |
166 bool m_receivingMessageTypeIsText; | 165 bool m_receivingMessageTypeIsText; |
167 int64_t m_sendingQuota; | 166 int64_t m_sendingQuota; |
168 int64_t m_receivedDataSizeForFlowControl; | 167 int64_t m_receivedDataSizeForFlowControl; |
169 unsigned long m_bufferedAmount; | |
170 size_t m_sentSizeOfTopMessage; | 168 size_t m_sentSizeOfTopMessage; |
171 | 169 |
172 String m_sourceURLAtConstruction; | 170 String m_sourceURLAtConstruction; |
173 unsigned m_lineNumberAtConstruction; | 171 unsigned m_lineNumberAtConstruction; |
174 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; | 172 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; |
175 | 173 |
176 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 174 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
177 }; | 175 }; |
178 | 176 |
179 } // namespace WebCore | 177 } // namespace WebCore |
180 | 178 |
181 #endif // NewWebSocketChannelImpl_h | 179 #endif // NewWebSocketChannelImpl_h |
OLD | NEW |