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

Unified Diff: Source/modules/serviceworkers/Body.h

Issue 786893004: [ServiceWorker] Use BodyStreamBuffer as the body data of the Response object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/modules/serviceworkers/Body.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Body.h
diff --git a/Source/modules/serviceworkers/Body.h b/Source/modules/serviceworkers/Body.h
index dbaa20a7f5ece170a43562a3587dc4ea33919b61..546f5d03623cec90b07b77ada98b60320a2041c6 100644
--- a/Source/modules/serviceworkers/Body.h
+++ b/Source/modules/serviceworkers/Body.h
@@ -18,6 +18,7 @@
namespace blink {
+class BodyStreamBuffer;
class ScriptState;
class Body
@@ -50,6 +51,8 @@ public:
void setBodyUsed();
bool bodyUsed() const;
+ bool streamAccessed() const;
+
// ActiveDOMObject override.
virtual void stop() override;
virtual bool hasPendingActivity() const override;
@@ -62,9 +65,12 @@ protected:
private:
class ReadableStreamSource;
+ class BlobHandleResolver;
+
void pullSource();
void readAllFromStream(ScriptState*);
ScriptPromise readAsync(ScriptState*, ResponseType);
+ void readAsyncFromBlob(PassRefPtr<BlobDataHandle>);
void resolveJSON(const String&);
// FileReaderLoaderClient functions.
@@ -73,7 +79,10 @@ private:
virtual void didFinishLoading() override;
virtual void didFail(FileError::ErrorCode) override;
- virtual PassRefPtr<BlobDataHandle> blobDataHandle() = 0;
+ void didBlobHandleResolveError(PassRefPtrWillBeRawPtr<DOMException>);
+
+ virtual PassRefPtr<BlobDataHandle> blobDataHandle(bool /* internal */) const = 0;
yhirano 2014/12/11 03:55:47 What does internal mean?
horo 2014/12/11 05:43:08 I wanted to use this flag to access the internal r
+ virtual BodyStreamBuffer* buffer(bool /* internal */) const = 0;
yhirano 2014/12/11 03:55:47 ditto
void didFinishLoadingViaStream(DOMArrayBuffer*);
« no previous file with comments | « no previous file | Source/modules/serviceworkers/Body.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698