Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : #ifndef nsOfflineCacheUpdateParent_h
7 : #define nsOfflineCacheUpdateParent_h
8 :
9 : #include "mozilla/docshell/POfflineCacheUpdateParent.h"
10 : #include "mozilla/BasePrincipal.h"
11 : #include "nsIOfflineCacheUpdate.h"
12 :
13 : #include "nsCOMPtr.h"
14 : #include "nsString.h"
15 : #include "nsILoadContext.h"
16 :
17 : class nsIPrincipal;
18 :
19 : namespace mozilla {
20 :
21 : namespace ipc {
22 : class URIParams;
23 : } // namespace ipc
24 :
25 : namespace docshell {
26 :
27 : class OfflineCacheUpdateParent : public POfflineCacheUpdateParent
28 : , public nsIOfflineCacheUpdateObserver
29 : , public nsILoadContext
30 : {
31 : typedef mozilla::ipc::URIParams URIParams;
32 : typedef mozilla::ipc::PrincipalInfo PrincipalInfo;
33 :
34 : public:
35 : NS_DECL_ISUPPORTS
36 : NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
37 : NS_DECL_NSILOADCONTEXT
38 :
39 : nsresult
40 : Schedule(const URIParams& manifestURI,
41 : const URIParams& documentURI,
42 : const PrincipalInfo& loadingPrincipalInfo,
43 : const bool& stickDocument);
44 :
45 : void
46 0 : StopSendingMessagesToChild()
47 : {
48 0 : mIPCClosed = true;
49 0 : }
50 :
51 : explicit OfflineCacheUpdateParent();
52 :
53 : virtual void ActorDestroy(ActorDestroyReason aWhy) override;
54 : private:
55 : ~OfflineCacheUpdateParent();
56 :
57 : bool mIPCClosed;
58 :
59 : nsCOMPtr<nsIPrincipal> mLoadingPrincipal;
60 : };
61 :
62 : } // namespace docshell
63 : } // namespace mozilla
64 :
65 : #endif
|