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 bool shouldFilterConnection(const KURL&); |
| 159 |
158 // m_handle is a handle of the connection. | 160 // m_handle is a handle of the connection. |
159 // m_handle == 0 means this channel is closed. | 161 // m_handle == 0 means this channel is closed. |
160 std::unique_ptr<WebSocketHandle> m_handle; | 162 std::unique_ptr<WebSocketHandle> m_handle; |
161 | 163 |
162 // m_client can be deleted while this channel is alive, but this class | 164 // m_client can be deleted while this channel is alive, but this class |
163 // expects that disconnect() is called before the deletion. | 165 // expects that disconnect() is called before the deletion. |
164 Member<WebSocketChannelClient> m_client; | 166 Member<WebSocketChannelClient> m_client; |
165 KURL m_url; | 167 KURL m_url; |
166 // m_identifier > 0 means calling scriptContextExecution() returns a Document. | 168 // m_identifier > 0 means calling scriptContextExecution() returns a Document. |
167 unsigned long m_identifier; | 169 unsigned long m_identifier; |
(...skipping 13 matching lines...) Expand all Loading... |
181 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; | 183 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; |
182 | 184 |
183 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 185 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
184 }; | 186 }; |
185 | 187 |
186 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); | 188 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); |
187 | 189 |
188 } // namespace blink | 190 } // namespace blink |
189 | 191 |
190 #endif // DocumentWebSocketChannel_h | 192 #endif // DocumentWebSocketChannel_h |
OLD | NEW |