2020-04-24 04:58:23 +03:00
|
|
|
/* vim: set sw=2 ts=8 et tw=80 : */
|
|
|
|
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_net_ParentProcessDocumentChannel_h
|
|
|
|
#define mozilla_net_ParentProcessDocumentChannel_h
|
|
|
|
|
2021-06-09 07:56:48 +03:00
|
|
|
#include "mozilla/ipc/ProtocolUtils.h"
|
2020-04-24 04:58:23 +03:00
|
|
|
#include "mozilla/net/DocumentChannel.h"
|
|
|
|
#include "mozilla/net/DocumentLoadListener.h"
|
2020-04-24 04:45:55 +03:00
|
|
|
#include "nsIObserver.h"
|
2021-10-14 15:57:59 +03:00
|
|
|
#include "nsIAsyncVerifyRedirectCallback.h"
|
2020-04-24 04:58:23 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
class ParentProcessDocumentChannel : public DocumentChannel,
|
|
|
|
public nsIAsyncVerifyRedirectCallback,
|
2020-06-12 08:56:28 +03:00
|
|
|
public nsIObserver {
|
2020-04-24 04:58:23 +03:00
|
|
|
public:
|
|
|
|
ParentProcessDocumentChannel(nsDocShellLoadState* aLoadState,
|
|
|
|
class LoadInfo* aLoadInfo,
|
2020-04-27 08:38:15 +03:00
|
|
|
nsLoadFlags aLoadFlags, uint32_t aCacheKey,
|
|
|
|
bool aUriModified, bool aIsXFOError);
|
2020-04-24 04:58:23 +03:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
|
2020-04-24 04:45:55 +03:00
|
|
|
NS_DECL_NSIOBSERVER
|
2020-04-24 04:58:23 +03:00
|
|
|
|
|
|
|
NS_IMETHOD AsyncOpen(nsIStreamListener* aListener) override;
|
|
|
|
NS_IMETHOD Cancel(nsresult aStatusCode) override;
|
|
|
|
|
|
|
|
RefPtr<PDocumentChannelParent::RedirectToRealChannelPromise>
|
|
|
|
RedirectToRealChannel(
|
|
|
|
nsTArray<ipc::Endpoint<extensions::PStreamFilterParent>>&&
|
|
|
|
aStreamFilterEndpoints,
|
2020-06-12 08:56:28 +03:00
|
|
|
uint32_t aRedirectFlags, uint32_t aLoadFlags);
|
2020-04-24 04:58:23 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
virtual ~ParentProcessDocumentChannel();
|
2020-05-11 03:42:09 +03:00
|
|
|
void RemoveObserver();
|
2020-04-24 04:58:23 +03:00
|
|
|
|
|
|
|
RefPtr<DocumentLoadListener> mDocumentLoadListener;
|
|
|
|
nsTArray<ipc::Endpoint<extensions::PStreamFilterParent>>
|
|
|
|
mStreamFilterEndpoints;
|
|
|
|
MozPromiseHolder<PDocumentChannelParent::RedirectToRealChannelPromise>
|
|
|
|
mPromise;
|
2020-04-24 04:45:55 +03:00
|
|
|
bool mRequestObserversCalled = false;
|
2020-04-24 04:58:23 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_net_ParentProcessDocumentChannel_h
|