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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 bool wasClean, | 162 bool wasClean, |
163 unsigned short code, | 163 unsigned short code, |
164 const String& reason) override; | 164 const String& reason) override; |
165 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override; | 165 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override; |
166 void didStartClosingHandshake(WebSocketHandle*) override; | 166 void didStartClosingHandshake(WebSocketHandle*) override; |
167 | 167 |
168 // Methods for BlobLoader. | 168 // Methods for BlobLoader. |
169 void didFinishLoadingBlob(DOMArrayBuffer*); | 169 void didFinishLoadingBlob(DOMArrayBuffer*); |
170 void didFailLoadingBlob(FileError::ErrorCode); | 170 void didFailLoadingBlob(FileError::ErrorCode); |
171 | 171 |
| 172 void failWithClosureCode(unsigned short code, |
| 173 const String& reason, |
| 174 MessageLevel, |
| 175 std::unique_ptr<SourceLocation>); |
| 176 |
| 177 bool shouldDisallowConnection(const KURL&); |
| 178 |
172 // m_handle is a handle of the connection. | 179 // m_handle is a handle of the connection. |
173 // m_handle == 0 means this channel is closed. | 180 // m_handle == 0 means this channel is closed. |
174 std::unique_ptr<WebSocketHandle> m_handle; | 181 std::unique_ptr<WebSocketHandle> m_handle; |
175 | 182 |
176 // m_client can be deleted while this channel is alive, but this class | 183 // m_client can be deleted while this channel is alive, but this class |
177 // expects that disconnect() is called before the deletion. | 184 // expects that disconnect() is called before the deletion. |
178 Member<WebSocketChannelClient> m_client; | 185 Member<WebSocketChannelClient> m_client; |
179 KURL m_url; | 186 KURL m_url; |
180 // m_identifier > 0 means calling scriptContextExecution() returns a Document. | 187 // m_identifier > 0 means calling scriptContextExecution() returns a Document. |
181 unsigned long m_identifier; | 188 unsigned long m_identifier; |
(...skipping 13 matching lines...) Expand all Loading... |
195 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; | 202 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; |
196 | 203 |
197 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 204 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
198 }; | 205 }; |
199 | 206 |
200 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); | 207 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); |
201 | 208 |
202 } // namespace blink | 209 } // namespace blink |
203 | 210 |
204 #endif // DocumentWebSocketChannel_h | 211 #endif // DocumentWebSocketChannel_h |
OLD | NEW |