Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: Source/core/fileapi/FileReaderLoader.h

Issue 603903003: [Streams] Pass WebDataConsumerHandle when the response arrives. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@web-data-pipe
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/fetch/ResourceLoader.cpp ('k') | Source/core/fileapi/FileReaderLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // If client is given, do the loading asynchronously. Otherwise, load synchr onously. 64 // If client is given, do the loading asynchronously. Otherwise, load synchr onously.
65 FileReaderLoader(ReadType, FileReaderLoaderClient*); 65 FileReaderLoader(ReadType, FileReaderLoaderClient*);
66 virtual ~FileReaderLoader(); 66 virtual ~FileReaderLoader();
67 67
68 void start(ExecutionContext*, PassRefPtr<BlobDataHandle>); 68 void start(ExecutionContext*, PassRefPtr<BlobDataHandle>);
69 void start(ExecutionContext*, const Stream&, unsigned readSize); 69 void start(ExecutionContext*, const Stream&, unsigned readSize);
70 void cancel(); 70 void cancel();
71 71
72 // ThreadableLoaderClient 72 // ThreadableLoaderClient
73 virtual void didReceiveResponse(unsigned long, const ResourceResponse&) over ride; 73 virtual void didReceiveResponse(unsigned long, const ResourceResponse&, Pass OwnPtr<WebDataConsumerHandle>) override;
74 virtual void didReceiveData(const char*, unsigned) override; 74 virtual void didReceiveData(const char*, unsigned) override;
75 virtual void didFinishLoading(unsigned long, double) override; 75 virtual void didFinishLoading(unsigned long, double) override;
76 virtual void didFail(const ResourceError&) override; 76 virtual void didFail(const ResourceError&) override;
77 77
78 String stringResult(); 78 String stringResult();
79 PassRefPtr<ArrayBuffer> arrayBufferResult() const; 79 PassRefPtr<ArrayBuffer> arrayBufferResult() const;
80 80
81 // Returns the total bytes received. Bytes ignored by m_rawData won't be 81 // Returns the total bytes received. Bytes ignored by m_rawData won't be
82 // counted. 82 // counted.
83 // 83 //
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool m_hasRange; 138 bool m_hasRange;
139 unsigned m_rangeStart; 139 unsigned m_rangeStart;
140 unsigned m_rangeEnd; 140 unsigned m_rangeEnd;
141 141
142 FileError::ErrorCode m_errorCode; 142 FileError::ErrorCode m_errorCode;
143 }; 143 };
144 144
145 } // namespace blink 145 } // namespace blink
146 146
147 #endif // FileReaderLoader_h 147 #endif // FileReaderLoader_h
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoader.cpp ('k') | Source/core/fileapi/FileReaderLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698