|
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 "nsIOfflineCacheUpdate.h" |
|
11 |
|
12 #include "nsString.h" |
|
13 #include "nsILoadContext.h" |
|
14 |
|
15 namespace mozilla { |
|
16 |
|
17 namespace dom { |
|
18 class TabParent; |
|
19 } |
|
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 |
|
33 public: |
|
34 NS_DECL_ISUPPORTS |
|
35 NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER |
|
36 NS_DECL_NSILOADCONTEXT |
|
37 |
|
38 nsresult |
|
39 Schedule(const URIParams& manifestURI, |
|
40 const URIParams& documentURI, |
|
41 const bool& stickDocument); |
|
42 |
|
43 void |
|
44 StopSendingMessagesToChild() |
|
45 { |
|
46 mIPCClosed = true; |
|
47 } |
|
48 |
|
49 OfflineCacheUpdateParent(uint32_t aAppId, bool aIsInBrowser); |
|
50 ~OfflineCacheUpdateParent(); |
|
51 |
|
52 virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; |
|
53 |
|
54 private: |
|
55 bool mIPCClosed; |
|
56 |
|
57 bool mIsInBrowserElement; |
|
58 uint32_t mAppId; |
|
59 }; |
|
60 |
|
61 } // namespace docshell |
|
62 } // namespace mozilla |
|
63 |
|
64 #endif |