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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St
ring&, unsigned); | 116 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St
ring&, unsigned); |
117 void sendInternal(); | 117 void sendInternal(); |
118 void flowControlIfNecessary(); | 118 void flowControlIfNecessary(); |
119 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, m_s
ourceURLAtConnection, m_lineNumberAtConnection); } | 119 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, m_s
ourceURLAtConnection, m_lineNumberAtConnection); } |
120 void abortAsyncOperations(); | 120 void abortAsyncOperations(); |
121 void handleDidClose(unsigned short code, const String& reason); | 121 void handleDidClose(unsigned short code, const String& reason); |
122 Document* document(); // can be called only when m_identifier > 0. | 122 Document* document(); // can be called only when m_identifier > 0. |
123 | 123 |
124 // WebSocketHandleClient functions. | 124 // WebSocketHandleClient functions. |
125 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W
ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE; | 125 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W
ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE; |
| 126 virtual void didFail(WebKit::WebSocketHandle*, const WebKit::WebString& mess
age) OVERRIDE; |
126 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS
ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE; | 127 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS
ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE; |
127 virtual void didClose(WebKit::WebSocketHandle*, unsigned short code, const W
ebKit::WebString& reason) OVERRIDE; | 128 virtual void didClose(WebKit::WebSocketHandle*, bool wasClean, unsigned shor
t code, const WebKit::WebString& reason) OVERRIDE; |
128 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota)
OVERRIDE { m_sendingQuota += quota; } | 129 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota)
OVERRIDE { m_sendingQuota += quota; } |
129 | 130 |
130 // Methods for BlobLoader. | 131 // Methods for BlobLoader. |
131 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>); | 132 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>); |
132 void didFailLoadingBlob(FileError::ErrorCode); | 133 void didFailLoadingBlob(FileError::ErrorCode); |
133 | 134 |
134 // WebSocketChannel functions. | 135 // WebSocketChannel functions. |
135 virtual void refWebSocketChannel() OVERRIDE { ref(); } | 136 virtual void refWebSocketChannel() OVERRIDE { ref(); } |
136 virtual void derefWebSocketChannel() OVERRIDE { deref(); } | 137 virtual void derefWebSocketChannel() OVERRIDE { deref(); } |
137 | 138 |
(...skipping 25 matching lines...) Expand all Loading... |
163 | 164 |
164 String m_sourceURLAtConnection; | 165 String m_sourceURLAtConnection; |
165 unsigned m_lineNumberAtConnection; | 166 unsigned m_lineNumberAtConnection; |
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 |