OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/fetch/FetchFormDataConsumerHandle.h" | 5 #include "modules/fetch/FetchFormDataConsumerHandle.h" |
6 | 6 |
7 #include "modules/fetch/DataConsumerHandleUtil.h" | 7 #include "modules/fetch/DataConsumerHandleUtil.h" |
8 #include "modules/fetch/FetchBlobDataConsumerHandle.h" | 8 #include "modules/fetch/FetchBlobDataConsumerHandle.h" |
9 #include "wtf/ThreadSafeRefCounted.h" | 9 #include "wtf/ThreadSafeRefCounted.h" |
10 #include "wtf/ThreadingPrimitives.h" | 10 #include "wtf/ThreadingPrimitives.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } | 285 } |
286 | 286 |
287 RefPtr<EncodedFormData> m_formData; | 287 RefPtr<EncodedFormData> m_formData; |
288 OwnPtr<FetchDataConsumerHandle> m_handle; | 288 OwnPtr<FetchDataConsumerHandle> m_handle; |
289 }; | 289 }; |
290 | 290 |
291 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(const St
ring& body) | 291 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(const St
ring& body) |
292 { | 292 { |
293 return adoptPtr(new FetchFormDataConsumerHandle(body)); | 293 return adoptPtr(new FetchFormDataConsumerHandle(body)); |
294 } | 294 } |
295 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(PassRefP
tr<DOMArrayBuffer> body) | 295 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(DOMArray
Buffer* body) |
296 { | 296 { |
297 return adoptPtr(new FetchFormDataConsumerHandle(body->data(), body->byteLeng
th())); | 297 return adoptPtr(new FetchFormDataConsumerHandle(body->data(), body->byteLeng
th())); |
298 } | 298 } |
299 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(PassRefP
tr<DOMArrayBufferView> body) | 299 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(DOMArray
BufferView* body) |
300 { | 300 { |
301 return adoptPtr(new FetchFormDataConsumerHandle(body->baseAddress(), body->b
yteLength())); | 301 return adoptPtr(new FetchFormDataConsumerHandle(body->baseAddress(), body->b
yteLength())); |
302 } | 302 } |
303 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(const vo
id* data, size_t size) | 303 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(const vo
id* data, size_t size) |
304 { | 304 { |
305 return adoptPtr(new FetchFormDataConsumerHandle(data, size)); | 305 return adoptPtr(new FetchFormDataConsumerHandle(data, size)); |
306 } | 306 } |
307 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(Executio
nContext* executionContext, PassRefPtr<EncodedFormData> body) | 307 PassOwnPtr<FetchDataConsumerHandle> FetchFormDataConsumerHandle::create(Executio
nContext* executionContext, PassRefPtr<EncodedFormData> body) |
308 { | 308 { |
309 return adoptPtr(new FetchFormDataConsumerHandle(executionContext, body)); | 309 return adoptPtr(new FetchFormDataConsumerHandle(executionContext, body)); |
(...skipping 19 matching lines...) Expand all Loading... |
329 } | 329 } |
330 } | 330 } |
331 FetchFormDataConsumerHandle::~FetchFormDataConsumerHandle() {} | 331 FetchFormDataConsumerHandle::~FetchFormDataConsumerHandle() {} |
332 | 332 |
333 FetchDataConsumerHandle::Reader* FetchFormDataConsumerHandle::obtainReaderIntern
al(Client* client) | 333 FetchDataConsumerHandle::Reader* FetchFormDataConsumerHandle::obtainReaderIntern
al(Client* client) |
334 { | 334 { |
335 return m_context->obtainReader(client).leakPtr(); | 335 return m_context->obtainReader(client).leakPtr(); |
336 } | 336 } |
337 | 337 |
338 } // namespace blink | 338 } // namespace blink |
OLD | NEW |