2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-10-11 15:35:10 +04:00
|
|
|
|
|
|
|
#ifndef mozilla_net_WyciwygChannelParent_h
|
|
|
|
#define mozilla_net_WyciwygChannelParent_h
|
|
|
|
|
|
|
|
#include "mozilla/net/PWyciwygChannelParent.h"
|
|
|
|
#include "mozilla/net/NeckoCommon.h"
|
|
|
|
#include "nsIStreamListener.h"
|
|
|
|
|
|
|
|
#include "nsIWyciwygChannel.h"
|
2012-07-23 02:35:33 +04:00
|
|
|
#include "nsIInterfaceRequestor.h"
|
|
|
|
#include "nsILoadContext.h"
|
2010-10-11 15:35:10 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
2012-12-29 13:02:16 +04:00
|
|
|
namespace dom {
|
|
|
|
class PBrowserParent;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
2012-12-29 13:02:16 +04:00
|
|
|
|
2010-10-11 15:35:10 +04:00
|
|
|
namespace net {
|
|
|
|
|
|
|
|
class WyciwygChannelParent : public PWyciwygChannelParent
|
|
|
|
, public nsIStreamListener
|
2012-07-23 02:35:33 +04:00
|
|
|
, public nsIInterfaceRequestor
|
2010-10-11 15:35:10 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
|
|
|
NS_DECL_NSISTREAMLISTENER
|
2012-07-23 02:35:33 +04:00
|
|
|
NS_DECL_NSIINTERFACEREQUESTOR
|
2010-10-11 15:35:10 +04:00
|
|
|
|
|
|
|
WyciwygChannelParent();
|
|
|
|
|
|
|
|
protected:
|
2014-06-24 20:36:44 +04:00
|
|
|
virtual ~WyciwygChannelParent();
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvInit(const URIParams& uri,
|
|
|
|
const ipc::PrincipalInfo& aRequestingPrincipalInfo,
|
|
|
|
const ipc::PrincipalInfo& aTriggeringPrincipalInfo,
|
|
|
|
const ipc::PrincipalInfo& aPrincipalToInheritInfo,
|
|
|
|
const uint32_t& aSecurityFlags,
|
|
|
|
const uint32_t& aContentPolicyType) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvAsyncOpen(const URIParams& original,
|
|
|
|
const uint32_t& loadFlags,
|
|
|
|
const IPC::SerializedLoadContext& loadContext,
|
|
|
|
const PBrowserOrId &parent) override;
|
2017-02-16 03:26:04 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvWriteToCacheEntry(const nsDependentSubstring& data) override;
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvCloseCacheEntry(const nsresult& reason) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvSetCharsetAndSource(const int32_t& source,
|
|
|
|
const nsCString& charset) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvSetSecurityInfo(const nsCString& securityInfo) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvCancel(const nsresult& statusCode) override;
|
|
|
|
virtual mozilla::ipc::IPCResult RecvAppData(const IPC::SerializedLoadContext& loadContext,
|
|
|
|
const PBrowserOrId &parent) override;
|
2010-10-11 15:35:10 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) override;
|
2010-10-11 15:35:10 +04:00
|
|
|
|
2013-01-11 18:40:25 +04:00
|
|
|
bool SetupAppData(const IPC::SerializedLoadContext& loadContext,
|
2014-11-04 04:58:00 +03:00
|
|
|
const PBrowserOrId &aParent);
|
2013-01-11 18:40:25 +04:00
|
|
|
|
2010-10-11 15:35:10 +04:00
|
|
|
nsCOMPtr<nsIWyciwygChannel> mChannel;
|
|
|
|
bool mIPCClosed;
|
2013-01-11 18:40:25 +04:00
|
|
|
bool mReceivedAppData;
|
2012-08-07 08:47:48 +04:00
|
|
|
nsCOMPtr<nsILoadContext> mLoadContext;
|
2010-10-11 15:35:10 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_net_WyciwygChannelParent_h
|