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

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

Issue 795323003: Move Fetch API releted code to modules/fetch. (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 | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/BodyStreamBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/BodyStreamBuffer.h
diff --git a/Source/modules/serviceworkers/BodyStreamBuffer.h b/Source/modules/serviceworkers/BodyStreamBuffer.h
deleted file mode 100644
index 6123bfdb4cddd2d45ac8c873ca98d3f3df4cb80d..0000000000000000000000000000000000000000
--- a/Source/modules/serviceworkers/BodyStreamBuffer.h
+++ /dev/null
@@ -1,70 +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 BodyStreamBuffer_h
-#define BodyStreamBuffer_h
-
-#include "core/dom/DOMException.h"
-#include "platform/blob/BlobData.h"
-#include "platform/heap/Heap.h"
-#include "wtf/Deque.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
-
-namespace blink {
-
-class DOMArrayBuffer;
-
-class BodyStreamBuffer final : public GarbageCollectedFinalized<BodyStreamBuffer> {
-public:
- class Observer : public GarbageCollectedFinalized<Observer> {
- public:
- virtual ~Observer() { }
- virtual void onWrite() = 0;
- virtual void onClose() = 0;
- virtual void onError() = 0;
- virtual void trace(Visitor*) { }
- };
- class BlobHandleCreatorClient : public GarbageCollectedFinalized<BlobHandleCreatorClient> {
- public:
- virtual ~BlobHandleCreatorClient() { }
- virtual void didCreateBlobHandle(PassRefPtr<BlobDataHandle>) = 0;
- virtual void didFail(PassRefPtrWillBeRawPtr<DOMException>) = 0;
- virtual void trace(Visitor*) { }
- };
- BodyStreamBuffer();
- ~BodyStreamBuffer() { }
-
- PassRefPtr<DOMArrayBuffer> read();
- bool isClosed() const { return m_isClosed; }
- bool hasError() const { return m_exception; }
- PassRefPtrWillBeRawPtr<DOMException> exception() const { return m_exception; }
-
- // Can't call after close() or error() was called.
- void write(PassRefPtr<DOMArrayBuffer>);
- // Can't call after close() or error() was called.
- void close();
- // Can't call after close() or error() was called.
- void error(PassRefPtrWillBeRawPtr<DOMException>);
-
- // This function registers an observer so it fails and returns false when an
- // observer was already registered
- bool readAllAndCreateBlobHandle(const String& contentType, BlobHandleCreatorClient*);
-
- // When an observer was registered this function fails and returns false.
- bool registerObserver(Observer*);
- void unregisterObserver();
- bool isObserverRegistered() const { return m_observer.get(); }
- void trace(Visitor*);
-
-private:
- Deque<RefPtr<DOMArrayBuffer> > m_queue;
- bool m_isClosed;
- RefPtrWillBeMember<DOMException> m_exception;
- Member<Observer> m_observer;
-};
-
-} // namespace blink
-
-#endif // BodyStreamBuffer_h
« no previous file with comments | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/BodyStreamBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698