diff options
Diffstat (limited to 'Source/WebCore/loader/NetscapePlugInStreamLoader.h')
-rw-r--r-- | Source/WebCore/loader/NetscapePlugInStreamLoader.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/Source/WebCore/loader/NetscapePlugInStreamLoader.h b/Source/WebCore/loader/NetscapePlugInStreamLoader.h index be5ac8e01..1fe772b26 100644 --- a/Source/WebCore/loader/NetscapePlugInStreamLoader.h +++ b/Source/WebCore/loader/NetscapePlugInStreamLoader.h @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -26,8 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef NetscapePlugInStreamLoader_h -#define NetscapePlugInStreamLoader_h +#pragma once #include "ResourceLoader.h" #include <wtf/Forward.h> @@ -38,6 +37,7 @@ class NetscapePlugInStreamLoader; class NetscapePlugInStreamLoaderClient { public: + virtual void willSendRequest(NetscapePlugInStreamLoader*, ResourceRequest&&, const ResourceResponse& redirectResponse, std::function<void (ResourceRequest&&)>&&) = 0; virtual void didReceiveResponse(NetscapePlugInStreamLoader*, const ResourceResponse&) = 0; virtual void didReceiveData(NetscapePlugInStreamLoader*, const char*, int) = 0; virtual void didFail(NetscapePlugInStreamLoader*, const ResourceError&) = 0; @@ -48,32 +48,36 @@ protected: virtual ~NetscapePlugInStreamLoaderClient() { } }; -class NetscapePlugInStreamLoader : public ResourceLoader { +class NetscapePlugInStreamLoader final : public ResourceLoader { public: - static PassRefPtr<NetscapePlugInStreamLoader> create(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&); + WEBCORE_EXPORT static RefPtr<NetscapePlugInStreamLoader> create(Frame&, NetscapePlugInStreamLoaderClient&, const ResourceRequest&); virtual ~NetscapePlugInStreamLoader(); - bool isDone() const; + WEBCORE_EXPORT bool isDone() const; private: - virtual void didReceiveResponse(const ResourceResponse&) override; - virtual void didReceiveData(const char*, unsigned, long long encodedDataLength, DataPayloadType) override; - virtual void didReceiveBuffer(PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType) override; - virtual void didFinishLoading(double finishTime) override; - virtual void didFail(const ResourceError&) override; + bool init(const ResourceRequest&) override; - virtual void releaseResources() override; + void willSendRequest(ResourceRequest&&, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&&)>&& callback) override; + void didReceiveResponse(const ResourceResponse&) override; + void didReceiveData(const char*, unsigned, long long encodedDataLength, DataPayloadType) override; + void didReceiveBuffer(Ref<SharedBuffer>&&, long long encodedDataLength, DataPayloadType) override; + void didFinishLoading(double finishTime) override; + void didFail(const ResourceError&) override; - NetscapePlugInStreamLoader(Frame*, NetscapePlugInStreamLoaderClient*); + void releaseResources() override; - virtual void willCancel(const ResourceError&) override; - virtual void didCancel(const ResourceError&) override; + NetscapePlugInStreamLoader(Frame&, NetscapePlugInStreamLoaderClient&); - void didReceiveDataOrBuffer(const char*, int, PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType); + void willCancel(const ResourceError&) override; + void didCancel(const ResourceError&) override; + + void didReceiveDataOrBuffer(const char*, int, RefPtr<SharedBuffer>&&, long long encodedDataLength, DataPayloadType); + + void notifyDone(); NetscapePlugInStreamLoaderClient* m_client; + bool m_isInitialized { false }; }; } - -#endif // NetscapePlugInStreamLoader_h |