| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 void WorkerWebSocketChannel::send(const DOMArrayBuffer& binaryData, unsigned byt
eOffset, unsigned byteLength) | 121 void WorkerWebSocketChannel::send(const DOMArrayBuffer& binaryData, unsigned byt
eOffset, unsigned byteLength) |
| 122 { | 122 { |
| 123 ASSERT(m_bridge); | 123 ASSERT(m_bridge); |
| 124 m_bridge->send(binaryData, byteOffset, byteLength); | 124 m_bridge->send(binaryData, byteOffset, byteLength); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void WorkerWebSocketChannel::send(PassRefPtr<BlobDataHandle> blobData) | 127 void WorkerWebSocketChannel::send(PassRefPtr<BlobDataHandle> blobData) |
| 128 { | 128 { |
| 129 ASSERT(m_bridge); | 129 ASSERT(m_bridge); |
| 130 m_bridge->send(blobData); | 130 m_bridge->send(std::move(blobData)); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void WorkerWebSocketChannel::close(int code, const String& reason) | 133 void WorkerWebSocketChannel::close(int code, const String& reason) |
| 134 { | 134 { |
| 135 ASSERT(m_bridge); | 135 ASSERT(m_bridge); |
| 136 m_bridge->close(code, reason); | 136 m_bridge->close(code, reason); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void WorkerWebSocketChannel::fail(const String& reason, MessageLevel level, std:
:unique_ptr<SourceLocation> location) | 139 void WorkerWebSocketChannel::fail(const String& reason, MessageLevel level, std:
:unique_ptr<SourceLocation> location) |
| 140 { | 140 { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 { | 211 { |
| 212 ASSERT(isMainThread()); | 212 ASSERT(isMainThread()); |
| 213 if (m_mainWebSocketChannel) | 213 if (m_mainWebSocketChannel) |
| 214 m_mainWebSocketChannel->sendBinaryAsCharVector(std::move(data)); | 214 m_mainWebSocketChannel->sendBinaryAsCharVector(std::move(data)); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void Peer::sendBlob(PassRefPtr<BlobDataHandle> blobData) | 217 void Peer::sendBlob(PassRefPtr<BlobDataHandle> blobData) |
| 218 { | 218 { |
| 219 ASSERT(isMainThread()); | 219 ASSERT(isMainThread()); |
| 220 if (m_mainWebSocketChannel) | 220 if (m_mainWebSocketChannel) |
| 221 m_mainWebSocketChannel->send(blobData); | 221 m_mainWebSocketChannel->send(std::move(blobData)); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void Peer::close(int code, const String& reason) | 224 void Peer::close(int code, const String& reason) |
| 225 { | 225 { |
| 226 ASSERT(isMainThread()); | 226 ASSERT(isMainThread()); |
| 227 if (!m_mainWebSocketChannel) | 227 if (!m_mainWebSocketChannel) |
| 228 return; | 228 return; |
| 229 m_mainWebSocketChannel->close(code, reason); | 229 m_mainWebSocketChannel->close(code, reason); |
| 230 } | 230 } |
| 231 | 231 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 m_workerGlobalScope.clear(); | 443 m_workerGlobalScope.clear(); |
| 444 } | 444 } |
| 445 | 445 |
| 446 DEFINE_TRACE(Bridge) | 446 DEFINE_TRACE(Bridge) |
| 447 { | 447 { |
| 448 visitor->trace(m_client); | 448 visitor->trace(m_client); |
| 449 visitor->trace(m_workerGlobalScope); | 449 visitor->trace(m_workerGlobalScope); |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace blink | 452 } // namespace blink |
| OLD | NEW |