| OLD | NEW |
| 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 BlobBytesConsumer_h | 5 #ifndef BlobBytesConsumer_h |
| 6 #define BlobBytesConsumer_h | 6 #define BlobBytesConsumer_h |
| 7 | 7 |
| 8 #include "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "core/loader/ThreadableLoaderClient.h" | 9 #include "core/loader/ThreadableLoaderClient.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy) override; | 42 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle(BlobSizePolicy) override; |
| 43 PassRefPtr<EncodedFormData> drainAsFormData() override; | 43 PassRefPtr<EncodedFormData> drainAsFormData() override; |
| 44 void setClient(BytesConsumer::Client*) override; | 44 void setClient(BytesConsumer::Client*) override; |
| 45 void clearClient() override; | 45 void clearClient() override; |
| 46 void cancel() override; | 46 void cancel() override; |
| 47 PublicState getPublicState() const override; | 47 PublicState getPublicState() const override; |
| 48 Error getError() const override; | 48 Error getError() const override; |
| 49 String debugName() const override { return "BlobBytesConsumer"; } | 49 String debugName() const override { return "BlobBytesConsumer"; } |
| 50 | 50 |
| 51 // ContextLifecycleObserver implementation | 51 // ContextLifecycleObserver implementation |
| 52 void contextDestroyed() override; | 52 void contextDestroyed(ExecutionContext*) override; |
| 53 | 53 |
| 54 // BytesConsumer::Client implementation | 54 // BytesConsumer::Client implementation |
| 55 void onStateChange() override; | 55 void onStateChange() override; |
| 56 | 56 |
| 57 // ThreadableLoaderClient implementation | 57 // ThreadableLoaderClient implementation |
| 58 void didReceiveResponse(unsigned long identifier, | 58 void didReceiveResponse(unsigned long identifier, |
| 59 const ResourceResponse&, | 59 const ResourceResponse&, |
| 60 std::unique_ptr<WebDataConsumerHandle>) override; | 60 std::unique_ptr<WebDataConsumerHandle>) override; |
| 61 void didFinishLoading(unsigned long identifier, double finishTime) override; | 61 void didFinishLoading(unsigned long identifier, double finishTime) override; |
| 62 void didFail(const ResourceError&) override; | 62 void didFail(const ResourceError&) override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 87 | 87 |
| 88 PublicState m_state = PublicState::ReadableOrWaiting; | 88 PublicState m_state = PublicState::ReadableOrWaiting; |
| 89 // These two booleans are meaningful only when m_state is ReadableOrWaiting. | 89 // These two booleans are meaningful only when m_state is ReadableOrWaiting. |
| 90 bool m_hasSeenEndOfData = false; | 90 bool m_hasSeenEndOfData = false; |
| 91 bool m_hasFinishedLoading = false; | 91 bool m_hasFinishedLoading = false; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| 95 | 95 |
| 96 #endif // BlobBytesConsumer_h | 96 #endif // BlobBytesConsumer_h |
| OLD | NEW |