2012-05-21 04:12:37 -07: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 04:35:10 -07: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-22 15:35:33 -07:00
|
|
|
#include "nsIInterfaceRequestor.h"
|
|
|
|
#include "nsILoadContext.h"
|
2010-10-11 04:35:10 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
class WyciwygChannelParent : public PWyciwygChannelParent
|
|
|
|
, public nsIStreamListener
|
2012-07-22 15:35:33 -07:00
|
|
|
, public nsIInterfaceRequestor
|
2010-10-11 04:35:10 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
|
|
|
NS_DECL_NSISTREAMLISTENER
|
2012-07-22 15:35:33 -07:00
|
|
|
NS_DECL_NSIINTERFACEREQUESTOR
|
2010-10-11 04:35:10 -07:00
|
|
|
|
|
|
|
WyciwygChannelParent();
|
|
|
|
virtual ~WyciwygChannelParent();
|
|
|
|
|
|
|
|
protected:
|
2012-08-23 12:33:46 -07:00
|
|
|
virtual bool RecvInit(const URIParams& uri);
|
|
|
|
virtual bool RecvAsyncOpen(const URIParams& original,
|
2012-08-22 08:56:38 -07:00
|
|
|
const uint32_t& loadFlags,
|
2012-12-28 16:18:38 -08:00
|
|
|
const IPC::SerializedLoadContext& loadContext);
|
2010-10-11 04:35:10 -07:00
|
|
|
virtual bool RecvWriteToCacheEntry(const nsString& data);
|
|
|
|
virtual bool RecvCloseCacheEntry(const nsresult& reason);
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual bool RecvSetCharsetAndSource(const int32_t& source,
|
2010-10-11 04:35:10 -07:00
|
|
|
const nsCString& charset);
|
|
|
|
virtual bool RecvSetSecurityInfo(const nsCString& securityInfo);
|
2010-11-19 13:12:45 -08:00
|
|
|
virtual bool RecvCancel(const nsresult& statusCode);
|
2010-10-11 04:35:10 -07:00
|
|
|
|
|
|
|
virtual void ActorDestroy(ActorDestroyReason why);
|
|
|
|
|
|
|
|
nsCOMPtr<nsIWyciwygChannel> mChannel;
|
|
|
|
bool mIPCClosed;
|
2012-08-06 21:47:48 -07:00
|
|
|
nsCOMPtr<nsILoadContext> mLoadContext;
|
2010-10-11 04:35:10 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_net_WyciwygChannelParent_h
|