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

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

Issue 555443002: [Fetch API] Put body members directly on Response/Request (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated yhirano's comment Created 6 years, 3 months 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 | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/FetchBodyStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/FetchBodyStream.h
diff --git a/Source/modules/serviceworkers/FetchBodyStream.h b/Source/modules/serviceworkers/FetchBodyStream.h
deleted file mode 100644
index 37afa229a21ddd67aa464b14397e4ab269294259..0000000000000000000000000000000000000000
--- a/Source/modules/serviceworkers/FetchBodyStream.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef FetchBodyStream_h
-#define FetchBodyStream_h
-
-#include "bindings/core/v8/ScriptPromise.h"
-#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "core/dom/ActiveDOMObject.h"
-#include "core/fileapi/FileReaderLoader.h"
-#include "core/fileapi/FileReaderLoaderClient.h"
-#include "platform/blob/BlobData.h"
-#include "platform/heap/Handle.h"
-#include "wtf/RefPtr.h"
-
-namespace blink {
-
-class ScriptState;
-
-class FetchBodyStream FINAL
- : public GarbageCollectedFinalized<FetchBodyStream>
- , public ScriptWrappable
- , public ActiveDOMObject
- , public FileReaderLoaderClient {
- DEFINE_WRAPPERTYPEINFO();
-public:
- enum ResponseType {
- ResponseAsArrayBuffer,
- ResponseAsBlob,
- ResponseAsFormData,
- ResponseAsJSON,
- ResponseAsText
- };
-
- static FetchBodyStream* create(ExecutionContext*, PassRefPtr<BlobDataHandle>);
-
- ScriptPromise asArrayBuffer(ScriptState*);
- ScriptPromise asBlob(ScriptState*);
- ScriptPromise asFormData(ScriptState*);
- ScriptPromise asJSON(ScriptState*);
- ScriptPromise asText(ScriptState*);
-
- // ActiveDOMObject override.
- virtual void stop() OVERRIDE;
- virtual bool hasPendingActivity() const OVERRIDE;
-
- void trace(Visitor*) { }
-
-private:
- FetchBodyStream(ExecutionContext*, PassRefPtr<BlobDataHandle>);
- ScriptPromise readAsync(ScriptState*, ResponseType);
- void resolveJSON();
-
- // FileReaderLoaderClient functions.
- virtual void didStartLoading() OVERRIDE;
- virtual void didReceiveData() OVERRIDE;
- virtual void didFinishLoading() OVERRIDE;
- virtual void didFail(FileError::ErrorCode) OVERRIDE;
-
- RefPtr<BlobDataHandle> m_blobDataHandle;
- OwnPtr<FileReaderLoader> m_loader;
- bool m_hasRead;
- ResponseType m_responseType;
- RefPtr<ScriptPromiseResolver> m_resolver;
-};
-
-} // namespace blink
-
-#endif // FetchBodyStream_h
« no previous file with comments | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/FetchBodyStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698