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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.h

Issue 2356693002: Remove BytesConsumer::read (Closed)
Patch Set: fix Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BytesConsumerForDataConsumerHandle_h 5 #ifndef BytesConsumerForDataConsumerHandle_h
6 #define BytesConsumerForDataConsumerHandle_h 6 #define BytesConsumerForDataConsumerHandle_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "modules/fetch/BytesConsumer.h" 9 #include "modules/fetch/BytesConsumer.h"
10 #include "modules/fetch/FetchFormDataConsumerHandle.h" 10 #include "modules/fetch/FetchFormDataConsumerHandle.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "public/platform/WebDataConsumerHandle.h" 12 #include "public/platform/WebDataConsumerHandle.h"
13 #include "wtf/PassRefPtr.h" 13 #include "wtf/PassRefPtr.h"
14 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
15 15
16 #include <memory> 16 #include <memory>
17 17
18 namespace blink { 18 namespace blink {
19 19
20 class ExecutionContext; 20 class ExecutionContext;
21 21
22 class MODULES_EXPORT BytesConsumerForDataConsumerHandle final : public BytesCons umer, public WebDataConsumerHandle::Client { 22 class MODULES_EXPORT BytesConsumerForDataConsumerHandle final : public BytesCons umer, public WebDataConsumerHandle::Client {
23 EAGERLY_FINALIZE(); 23 EAGERLY_FINALIZE();
24 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); 24 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW();
25 public: 25 public:
26 BytesConsumerForDataConsumerHandle(ExecutionContext*, std::unique_ptr<FetchD ataConsumerHandle>); 26 BytesConsumerForDataConsumerHandle(ExecutionContext*, std::unique_ptr<FetchD ataConsumerHandle>);
27 ~BytesConsumerForDataConsumerHandle() override; 27 ~BytesConsumerForDataConsumerHandle() override;
28 28
29 Result read(char* buffer, size_t /* size */, size_t* readSize) override;
30 Result beginRead(const char** buffer, size_t* available) override; 29 Result beginRead(const char** buffer, size_t* available) override;
31 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy) override; 30 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy) override;
32 PassRefPtr<EncodedFormData> drainAsFormData() override; 31 PassRefPtr<EncodedFormData> drainAsFormData() override;
33 Result endRead(size_t readSize) override; 32 Result endRead(size_t readSize) override;
34 void setClient(BytesConsumer::Client*) override; 33 void setClient(BytesConsumer::Client*) override;
35 void clearClient() override; 34 void clearClient() override;
36 35
37 void cancel() override; 36 void cancel() override;
38 PublicState getPublicState() const override; 37 PublicState getPublicState() const override;
39 Error getError() const override 38 Error getError() const override
(...skipping 18 matching lines...) Expand all
58 Member<BytesConsumer::Client> m_client; 57 Member<BytesConsumer::Client> m_client;
59 InternalState m_state = InternalState::Waiting; 58 InternalState m_state = InternalState::Waiting;
60 Error m_error; 59 Error m_error;
61 bool m_isInTwoPhaseRead = false; 60 bool m_isInTwoPhaseRead = false;
62 bool m_hasPendingNotification = false; 61 bool m_hasPendingNotification = false;
63 }; 62 };
64 63
65 } // namespace blink 64 } // namespace blink
66 65
67 #endif // BytesConsumerForDataConsumerHandle_h 66 #endif // BytesConsumerForDataConsumerHandle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698