| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 std::unique_ptr<Vector<char>> data = wrapUnique(new Vector<char>(byteLength)
); | 409 std::unique_ptr<Vector<char>> data = wrapUnique(new Vector<char>(byteLength)
); |
| 410 if (binaryData.byteLength()) | 410 if (binaryData.byteLength()) |
| 411 memcpy(data->data(), static_cast<const char*>(binaryData.data()) + byteO
ffset, byteLength); | 411 memcpy(data->data(), static_cast<const char*>(binaryData.data()) + byteO
ffset, byteLength); |
| 412 | 412 |
| 413 m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer
::sendBinaryAsCharVector, m_peer, passed(std::move(data)))); | 413 m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer
::sendBinaryAsCharVector, m_peer, passed(std::move(data)))); |
| 414 } | 414 } |
| 415 | 415 |
| 416 void Bridge::send(PassRefPtr<BlobDataHandle> data) | 416 void Bridge::send(PassRefPtr<BlobDataHandle> data) |
| 417 { | 417 { |
| 418 ASSERT(m_peer); | 418 ASSERT(m_peer); |
| 419 m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer
::sendBlob, m_peer, data)); | 419 m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer
::sendBlob, m_peer, std::move(data))); |
| 420 } | 420 } |
| 421 | 421 |
| 422 void Bridge::close(int code, const String& reason) | 422 void Bridge::close(int code, const String& reason) |
| 423 { | 423 { |
| 424 ASSERT(m_peer); | 424 ASSERT(m_peer); |
| 425 m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer
::close, m_peer, code, reason)); | 425 m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer
::close, m_peer, code, reason)); |
| 426 } | 426 } |
| 427 | 427 |
| 428 void Bridge::fail(const String& reason, MessageLevel level, std::unique_ptr<Sour
ceLocation> location) | 428 void Bridge::fail(const String& reason, MessageLevel level, std::unique_ptr<Sour
ceLocation> location) |
| 429 { | 429 { |
| (...skipping 13 matching lines...) Expand all 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 |