void WebCryptoResult::completeWithBuffer(const void* bytes, unsigned bytesSize) { WebArrayBuffer buffer = blink::WebArrayBuffer::create(bytesSize, 1); RELEASE_ASSERT(!buffer.isNull()); memcpy(buffer.data(), bytes, bytesSize); completeWithBuffer(buffer); }
bool WebSocketImpl::sendArrayBuffer(const WebArrayBuffer& webArrayBuffer) { size_t size = webArrayBuffer.byteLength(); m_bufferedAmount += size; if (m_isClosingOrClosed) m_bufferedAmountAfterClose += size; // FIXME: Deprecate this call. m_client->didUpdateBufferedAmount(m_bufferedAmount); if (m_isClosingOrClosed) return true; m_private->send(*PassRefPtr<ArrayBuffer>(webArrayBuffer), 0, webArrayBuffer.byteLength()); return true; }
bool WebSocketImpl::sendArrayBuffer(const WebArrayBuffer& webArrayBuffer) { #if ENABLE(WEB_SOCKETS) return m_private->send(*PassRefPtr<ArrayBuffer>(webArrayBuffer), 0, webArrayBuffer.byteLength()) == ThreadableWebSocketChannel::SendSuccess; #else ASSERT_NOT_REACHED(); #endif }
bool WebPepperSocketImpl::sendArrayBuffer( const WebArrayBuffer& webArrayBuffer) { size_t size = webArrayBuffer.byteLength(); m_bufferedAmount += size; if (m_isClosingOrClosed) m_bufferedAmountAfterClose += size; // FIXME: Deprecate this call. m_client->didUpdateBufferedAmount(m_bufferedAmount); if (m_isClosingOrClosed) return true; DOMArrayBuffer* arrayBuffer = webArrayBuffer; m_private->send(*arrayBuffer, 0, arrayBuffer->byteLength()); return true; }
bool WebSocketImpl::sendArrayBuffer(const WebArrayBuffer& webArrayBuffer) { return m_private->send(*PassRefPtr<ArrayBuffer>(webArrayBuffer), 0, webArrayBuffer.byteLength()) == WebSocketChannel::SendSuccess; }
void WebCryptoResult::completeWithBuffer(const WebArrayBuffer& buffer) { RELEASE_ASSERT(!buffer.isNull()); m_impl->completeWithBuffer(buffer); reset(); }