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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 bool wasClean, | 148 bool wasClean, |
149 unsigned short code, | 149 unsigned short code, |
150 const String& reason) override; | 150 const String& reason) override; |
151 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override; | 151 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override; |
152 void didStartClosingHandshake(WebSocketHandle*) override; | 152 void didStartClosingHandshake(WebSocketHandle*) override; |
153 | 153 |
154 // Methods for BlobLoader. | 154 // Methods for BlobLoader. |
155 void didFinishLoadingBlob(DOMArrayBuffer*); | 155 void didFinishLoadingBlob(DOMArrayBuffer*); |
156 void didFailLoadingBlob(FileError::ErrorCode); | 156 void didFailLoadingBlob(FileError::ErrorCode); |
157 | 157 |
| 158 void failWithClosureCode(unsigned short code, |
| 159 const String& reason, |
| 160 MessageLevel, |
| 161 std::unique_ptr<SourceLocation>); |
| 162 |
| 163 bool shouldFilterConnection(const KURL&); |
| 164 |
158 // m_handle is a handle of the connection. | 165 // m_handle is a handle of the connection. |
159 // m_handle == 0 means this channel is closed. | 166 // m_handle == 0 means this channel is closed. |
160 std::unique_ptr<WebSocketHandle> m_handle; | 167 std::unique_ptr<WebSocketHandle> m_handle; |
161 | 168 |
162 // m_client can be deleted while this channel is alive, but this class | 169 // m_client can be deleted while this channel is alive, but this class |
163 // expects that disconnect() is called before the deletion. | 170 // expects that disconnect() is called before the deletion. |
164 Member<WebSocketChannelClient> m_client; | 171 Member<WebSocketChannelClient> m_client; |
165 KURL m_url; | 172 KURL m_url; |
166 // m_identifier > 0 means calling scriptContextExecution() returns a Document. | 173 // m_identifier > 0 means calling scriptContextExecution() returns a Document. |
167 unsigned long m_identifier; | 174 unsigned long m_identifier; |
(...skipping 13 matching lines...) Expand all Loading... |
181 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; | 188 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; |
182 | 189 |
183 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 190 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
184 }; | 191 }; |
185 | 192 |
186 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); | 193 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); |
187 | 194 |
188 } // namespace blink | 195 } // namespace blink |
189 | 196 |
190 #endif // DocumentWebSocketChannel_h | 197 #endif // DocumentWebSocketChannel_h |
OLD | NEW |