Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 processPendingTasks(); | 95 processPendingTasks(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(PassOwnPtr<Ve ctor<char> > binaryData) | 98 void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(PassOwnPtr<Ve ctor<char> > binaryData) |
| 99 { | 99 { |
| 100 m_pendingTasks.append(createCallbackTask(&didReceiveBinaryDataCallback, this , binaryData)); | 100 m_pendingTasks.append(createCallbackTask(&didReceiveBinaryDataCallback, this , binaryData)); |
| 101 if (!m_suspended) | 101 if (!m_suspended) |
| 102 processPendingTasks(); | 102 processPendingTasks(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned l ong bufferedAmount) | 105 void ThreadableWebSocketChannelClientWrapper::didIncreaseBufferedAmount(unsigned long amount) |
| 106 { | 106 { |
| 107 m_pendingTasks.append(createCallbackTask(&didUpdateBufferedAmountCallback, t his, bufferedAmount)); | 107 m_pendingTasks.append(createCallbackTask(&didIncreaseBufferedAmountCallback, this, amount)); |
| 108 if (!m_suspended) | 108 if (!m_suspended) |
| 109 processPendingTasks(); | 109 processPendingTasks(); |
| 110 } | 110 } |
|
tyoshino (SeeGerritForStatus)
2014/06/09 09:24:26
blank line here
yhirano
2014/06/09 11:59:51
Done.
| |
| 111 void ThreadableWebSocketChannelClientWrapper::didDecreaseBufferedAmount(unsigned long amount) | |
| 112 | |
|
tyoshino (SeeGerritForStatus)
2014/06/09 09:24:26
remove this blank line
yhirano
2014/06/09 11:59:51
Done.
| |
| 113 { | |
| 114 m_pendingTasks.append(createCallbackTask(&didDecreaseBufferedAmountCallback, this, amount)); | |
| 115 if (!m_suspended) | |
| 116 processPendingTasks(); | |
| 117 } | |
| 111 | 118 |
| 112 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake() | 119 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake() |
| 113 { | 120 { |
| 114 m_pendingTasks.append(createCallbackTask(&didStartClosingHandshakeCallback, this)); | 121 m_pendingTasks.append(createCallbackTask(&didStartClosingHandshakeCallback, this)); |
| 115 if (!m_suspended) | 122 if (!m_suspended) |
| 116 processPendingTasks(); | 123 processPendingTasks(); |
| 117 } | 124 } |
| 118 | 125 |
| 119 void ThreadableWebSocketChannelClientWrapper::didClose(unsigned long unhandledBu fferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHa ndshakeCompletion, unsigned short code, const String& reason) | 126 void ThreadableWebSocketChannelClientWrapper::didClose(unsigned long unhandledBu fferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHa ndshakeCompletion, unsigned short code, const String& reason) |
| 120 { | 127 { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 wrapper->m_client->didReceiveMessage(message); | 172 wrapper->m_client->didReceiveMessage(message); |
| 166 } | 173 } |
| 167 | 174 |
| 168 void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback(Execu tionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wrappe r, PassOwnPtr<Vector<char> > binaryData) | 175 void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback(Execu tionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wrappe r, PassOwnPtr<Vector<char> > binaryData) |
| 169 { | 176 { |
| 170 ASSERT_UNUSED(context, !context); | 177 ASSERT_UNUSED(context, !context); |
| 171 if (wrapper->m_client) | 178 if (wrapper->m_client) |
| 172 wrapper->m_client->didReceiveBinaryData(binaryData); | 179 wrapper->m_client->didReceiveBinaryData(binaryData); |
| 173 } | 180 } |
| 174 | 181 |
| 175 void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback(Ex ecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wra pper, unsigned long bufferedAmount) | 182 void ThreadableWebSocketChannelClientWrapper::didIncreaseBufferedAmountCallback( ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> w rapper, unsigned long amount) |
| 176 { | 183 { |
| 177 ASSERT_UNUSED(context, !context); | 184 ASSERT_UNUSED(context, !context); |
| 178 if (wrapper->m_client) | 185 if (wrapper->m_client) |
| 179 wrapper->m_client->didUpdateBufferedAmount(bufferedAmount); | 186 wrapper->m_client->didIncreaseBufferedAmount(amount); |
| 180 } | 187 } |
| 181 | 188 |
| 189 void ThreadableWebSocketChannelClientWrapper::didDecreaseBufferedAmountCallback( ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> w rapper, unsigned long amount) | |
| 190 { | |
| 191 ASSERT_UNUSED(context, !context); | |
| 192 if (wrapper->m_client) | |
| 193 wrapper->m_client->didDecreaseBufferedAmount(amount); | |
| 194 } | |
| 195 | |
| 196 | |
|
tyoshino (SeeGerritForStatus)
2014/06/09 09:24:26
one blank line
yhirano
2014/06/09 11:59:51
Done.
| |
| 182 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback(E xecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wr apper) | 197 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback(E xecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wr apper) |
| 183 { | 198 { |
| 184 ASSERT_UNUSED(context, !context); | 199 ASSERT_UNUSED(context, !context); |
| 185 if (wrapper->m_client) | 200 if (wrapper->m_client) |
| 186 wrapper->m_client->didStartClosingHandshake(); | 201 wrapper->m_client->didStartClosingHandshake(); |
| 187 } | 202 } |
| 188 | 203 |
| 189 void ThreadableWebSocketChannelClientWrapper::didCloseCallback(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletion Status closingHandshakeCompletion, unsigned short code, const String& reason) | 204 void ThreadableWebSocketChannelClientWrapper::didCloseCallback(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletion Status closingHandshakeCompletion, unsigned short code, const String& reason) |
| 190 { | 205 { |
| 191 ASSERT_UNUSED(context, !context); | 206 ASSERT_UNUSED(context, !context); |
| 192 if (wrapper->m_client) | 207 if (wrapper->m_client) |
| 193 wrapper->m_client->didClose(unhandledBufferedAmount, closingHandshakeCom pletion, code, reason); | 208 wrapper->m_client->didClose(unhandledBufferedAmount, closingHandshakeCom pletion, code, reason); |
| 194 } | 209 } |
| 195 | 210 |
| 196 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback(Exe cutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wrap per) | 211 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback(Exe cutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> wrap per) |
| 197 { | 212 { |
| 198 ASSERT_UNUSED(context, !context); | 213 ASSERT_UNUSED(context, !context); |
| 199 if (wrapper->m_client) | 214 if (wrapper->m_client) |
| 200 wrapper->m_client->didReceiveMessageError(); | 215 wrapper->m_client->didReceiveMessageError(); |
| 201 } | 216 } |
| 202 | 217 |
| 203 } // namespace WebCore | 218 } // namespace WebCore |
| OLD | NEW |