| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 m_suspended = false; | 245 m_suspended = false; |
| 246 if ((!m_buffer.isEmpty() || (m_state == ChannelClosed)) && m_client && !m_re
sumeTimer.isActive()) | 246 if ((!m_buffer.isEmpty() || (m_state == ChannelClosed)) && m_client && !m_re
sumeTimer.isActive()) |
| 247 m_resumeTimer.startOneShot(0); | 247 m_resumeTimer.startOneShot(0); |
| 248 } | 248 } |
| 249 | 249 |
| 250 void MainThreadWebSocketChannel::willOpenSocketStream(SocketStreamHandle* handle
) | 250 void MainThreadWebSocketChannel::willOpenSocketStream(SocketStreamHandle* handle
) |
| 251 { | 251 { |
| 252 LOG(Network, "MainThreadWebSocketChannel %p willOpenSocketStream()", this); | 252 LOG(Network, "MainThreadWebSocketChannel %p willOpenSocketStream()", this); |
| 253 ASSERT(handle); | 253 ASSERT(handle); |
| 254 if (m_document->frame()) | 254 if (m_document->frame()) |
| 255 m_document->frame()->loader()->client()->dispatchWillOpenSocketStream(ha
ndle); | 255 m_document->frame()->loader().client()->dispatchWillOpenSocketStream(han
dle); |
| 256 } | 256 } |
| 257 | 257 |
| 258 void MainThreadWebSocketChannel::didOpenSocketStream(SocketStreamHandle* handle) | 258 void MainThreadWebSocketChannel::didOpenSocketStream(SocketStreamHandle* handle) |
| 259 { | 259 { |
| 260 LOG(Network, "MainThreadWebSocketChannel %p didOpenSocketStream()", this); | 260 LOG(Network, "MainThreadWebSocketChannel %p didOpenSocketStream()", this); |
| 261 ASSERT(handle == m_handle); | 261 ASSERT(handle == m_handle); |
| 262 if (!m_document) | 262 if (!m_document) |
| 263 return; | 263 return; |
| 264 if (m_identifier) | 264 if (m_identifier) |
| 265 InspectorInstrumentation::willSendWebSocketHandshakeRequest(m_document,
m_identifier, *m_handshake->clientHandshakeRequest()); | 265 InspectorInstrumentation::willSendWebSocketHandshakeRequest(m_document,
m_identifier, *m_handshake->clientHandshakeRequest()); |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 } | 807 } |
| 808 | 808 |
| 809 Vector<char> frameData; | 809 Vector<char> frameData; |
| 810 frame.makeFrameData(frameData); | 810 frame.makeFrameData(frameData); |
| 811 | 811 |
| 812 m_perMessageDeflate.resetDeflateBuffer(); | 812 m_perMessageDeflate.resetDeflateBuffer(); |
| 813 return m_handle->send(frameData.data(), frameData.size()); | 813 return m_handle->send(frameData.data(), frameData.size()); |
| 814 } | 814 } |
| 815 | 815 |
| 816 } // namespace WebCore | 816 } // namespace WebCore |
| OLD | NEW |