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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 class Resumer; | 119 class Resumer; |
120 | 120 |
121 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St
ring&, unsigned); | 121 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St
ring&, unsigned); |
122 void sendInternal(); | 122 void sendInternal(); |
123 void flowControlIfNecessary(); | 123 void flowControlIfNecessary(); |
124 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, "",
0); } | 124 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, "",
0); } |
125 void abortAsyncOperations(); | 125 void abortAsyncOperations(); |
126 | 126 |
127 // WebSocketHandleClient functions. | 127 // WebSocketHandleClient functions. |
128 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W
ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE; | 128 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W
ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE; |
| 129 virtual void didFail(WebKit::WebSocketHandle*, const WebKit::WebString& mess
age) OVERRIDE; |
129 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS
ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE; | 130 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS
ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE; |
130 virtual void didClose(WebKit::WebSocketHandle*, unsigned short code, const W
ebKit::WebString& reason) OVERRIDE; | 131 virtual void didClose(WebKit::WebSocketHandle*, bool wasClean, unsigned shor
t code, const WebKit::WebString& reason) OVERRIDE; |
131 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota)
OVERRIDE { m_sendingQuota += quota; } | 132 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota)
OVERRIDE { m_sendingQuota += quota; } |
132 | 133 |
133 // Methods for BlobLoader. | 134 // Methods for BlobLoader. |
134 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>); | 135 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>); |
135 void didFailLoadingBlob(FileError::ErrorCode); | 136 void didFailLoadingBlob(FileError::ErrorCode); |
136 | 137 |
137 // WebSocketChannel functions. | 138 // WebSocketChannel functions. |
138 virtual void refWebSocketChannel() OVERRIDE { ref(); } | 139 virtual void refWebSocketChannel() OVERRIDE { ref(); } |
139 virtual void derefWebSocketChannel() OVERRIDE { deref(); } | 140 virtual void derefWebSocketChannel() OVERRIDE { deref(); } |
140 | 141 |
(...skipping 22 matching lines...) Expand all Loading... |
163 size_t m_sentSizeOfTopMessage; | 164 size_t m_sentSizeOfTopMessage; |
164 String m_subprotocol; | 165 String m_subprotocol; |
165 String m_extensions; | 166 String m_extensions; |
166 | 167 |
167 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 168 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
168 }; | 169 }; |
169 | 170 |
170 } // namespace WebCore | 171 } // namespace WebCore |
171 | 172 |
172 #endif // NewWebSocketChannelImpl_h | 173 #endif // NewWebSocketChannelImpl_h |
OLD | NEW |