netwerk/protocol/wyciwyg/WyciwygChannelParent.h

branch
TOR_BUG_9701
changeset 14
925c144e1f1f
equal deleted inserted replaced
-1:000000000000 0:e88672a39c29
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifndef mozilla_net_WyciwygChannelParent_h
6 #define mozilla_net_WyciwygChannelParent_h
7
8 #include "mozilla/net/PWyciwygChannelParent.h"
9 #include "mozilla/net/NeckoCommon.h"
10 #include "nsIStreamListener.h"
11
12 #include "nsIWyciwygChannel.h"
13 #include "nsIInterfaceRequestor.h"
14 #include "nsILoadContext.h"
15
16 namespace mozilla {
17 namespace dom {
18 class PBrowserParent;
19 }
20
21 namespace net {
22
23 class WyciwygChannelParent : public PWyciwygChannelParent
24 , public nsIStreamListener
25 , public nsIInterfaceRequestor
26 {
27 public:
28 NS_DECL_ISUPPORTS
29 NS_DECL_NSIREQUESTOBSERVER
30 NS_DECL_NSISTREAMLISTENER
31 NS_DECL_NSIINTERFACEREQUESTOR
32
33 WyciwygChannelParent();
34 virtual ~WyciwygChannelParent();
35
36 protected:
37 virtual bool RecvInit(const URIParams& uri) MOZ_OVERRIDE;
38 virtual bool RecvAsyncOpen(const URIParams& original,
39 const uint32_t& loadFlags,
40 const IPC::SerializedLoadContext& loadContext,
41 PBrowserParent* parent) MOZ_OVERRIDE;
42 virtual bool RecvWriteToCacheEntry(const nsString& data) MOZ_OVERRIDE;
43 virtual bool RecvCloseCacheEntry(const nsresult& reason) MOZ_OVERRIDE;
44 virtual bool RecvSetCharsetAndSource(const int32_t& source,
45 const nsCString& charset) MOZ_OVERRIDE;
46 virtual bool RecvSetSecurityInfo(const nsCString& securityInfo) MOZ_OVERRIDE;
47 virtual bool RecvCancel(const nsresult& statusCode) MOZ_OVERRIDE;
48 virtual bool RecvAppData(const IPC::SerializedLoadContext& loadContext,
49 PBrowserParent* parent) MOZ_OVERRIDE;
50
51 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
52
53 bool SetupAppData(const IPC::SerializedLoadContext& loadContext,
54 PBrowserParent* aParent);
55
56 nsCOMPtr<nsIWyciwygChannel> mChannel;
57 bool mIPCClosed;
58 bool mReceivedAppData;
59 nsCOMPtr<nsILoadContext> mLoadContext;
60 };
61
62 } // namespace net
63 } // namespace mozilla
64
65 #endif // mozilla_net_WyciwygChannelParent_h

mercurial