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

Side by Side Diff: Source/modules/serviceworkers/BodyStreamBuffer.h

Issue 787793002: [ServiceWorker] Add contentType argument to BodyStreamBuffer::readAllAndCreateBlobHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add contentType argument to BodyStreamBuffer::readAllAndCreateBlobHandle 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/modules/serviceworkers/BodyStreamBuffer.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef BodyStreamBuffer_h 5 #ifndef BodyStreamBuffer_h
6 #define BodyStreamBuffer_h 6 #define BodyStreamBuffer_h
7 7
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "platform/blob/BlobData.h" 9 #include "platform/blob/BlobData.h"
10 #include "platform/heap/Heap.h" 10 #include "platform/heap/Heap.h"
11 #include "wtf/Deque.h" 11 #include "wtf/Deque.h"
12 #include "wtf/RefPtr.h" 12 #include "wtf/RefPtr.h"
13 #include "wtf/text/WTFString.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class DOMArrayBuffer; 17 class DOMArrayBuffer;
17 18
18 class BodyStreamBuffer final : public GarbageCollectedFinalized<BodyStreamBuffer > { 19 class BodyStreamBuffer final : public GarbageCollectedFinalized<BodyStreamBuffer > {
19 public: 20 public:
20 class Observer : public GarbageCollectedFinalized<Observer> { 21 class Observer : public GarbageCollectedFinalized<Observer> {
21 public: 22 public:
22 virtual ~Observer() { } 23 virtual ~Observer() { }
(...skipping 19 matching lines...) Expand all
42 43
43 // Can't call after close() or error() was called. 44 // Can't call after close() or error() was called.
44 void write(PassRefPtr<DOMArrayBuffer>); 45 void write(PassRefPtr<DOMArrayBuffer>);
45 // Can't call after close() or error() was called. 46 // Can't call after close() or error() was called.
46 void close(); 47 void close();
47 // Can't call after close() or error() was called. 48 // Can't call after close() or error() was called.
48 void error(PassRefPtrWillBeRawPtr<DOMException>); 49 void error(PassRefPtrWillBeRawPtr<DOMException>);
49 50
50 // This function registers an observer so it fails and returns false when an 51 // This function registers an observer so it fails and returns false when an
51 // observer was already registered 52 // observer was already registered
52 bool readAllAndCreateBlobHandle(BlobHandleCreatorClient*); 53 bool readAllAndCreateBlobHandle(const String& /* contentType */, BlobHandleC reatorClient*);
yhirano 2014/12/11 04:52:59 You don't have to comment out the parameter name.
horo 2014/12/11 05:45:11 Done.
53 54
54 // When an observer was registered this function fails and returns false. 55 // When an observer was registered this function fails and returns false.
55 bool registerObserver(Observer*); 56 bool registerObserver(Observer*);
56 void unregisterObserver(); 57 void unregisterObserver();
57 bool isObserverRegistered() const { return m_observer.get(); } 58 bool isObserverRegistered() const { return m_observer.get(); }
58 void trace(Visitor*); 59 void trace(Visitor*);
59 60
60 private: 61 private:
61 Deque<RefPtr<DOMArrayBuffer> > m_queue; 62 Deque<RefPtr<DOMArrayBuffer> > m_queue;
62 bool m_isClosed; 63 bool m_isClosed;
63 RefPtrWillBeMember<DOMException> m_exception; 64 RefPtrWillBeMember<DOMException> m_exception;
64 Member<Observer> m_observer; 65 Member<Observer> m_observer;
65 }; 66 };
66 67
67 } // namespace blink 68 } // namespace blink
68 69
69 #endif // BodyStreamBuffer_h 70 #endif // BodyStreamBuffer_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/serviceworkers/BodyStreamBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698