2010-10-20 21:12:32 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
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-20 21:12:32 +04:00
|
|
|
|
|
|
|
#ifndef nsOfflineCacheUpdateParent_h
|
|
|
|
#define nsOfflineCacheUpdateParent_h
|
|
|
|
|
|
|
|
#include "mozilla/docshell/POfflineCacheUpdateParent.h"
|
|
|
|
#include "nsIOfflineCacheUpdate.h"
|
|
|
|
|
|
|
|
#include "nsString.h"
|
2012-07-31 10:36:00 +04:00
|
|
|
#include "nsILoadContext.h"
|
2010-10-20 21:12:32 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
2012-08-23 23:33:46 +04:00
|
|
|
|
2012-12-29 13:02:16 +04:00
|
|
|
namespace dom {
|
|
|
|
class TabParent;
|
|
|
|
}
|
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
namespace ipc {
|
|
|
|
class URIParams;
|
|
|
|
} // namespace ipc
|
|
|
|
|
2010-10-20 21:12:32 +04:00
|
|
|
namespace docshell {
|
|
|
|
|
|
|
|
class OfflineCacheUpdateParent : public POfflineCacheUpdateParent
|
|
|
|
, public nsIOfflineCacheUpdateObserver
|
2012-07-31 10:36:00 +04:00
|
|
|
, public nsILoadContext
|
2010-10-20 21:12:32 +04:00
|
|
|
{
|
2012-08-23 23:33:46 +04:00
|
|
|
typedef mozilla::ipc::URIParams URIParams;
|
|
|
|
|
|
|
|
public:
|
2010-10-20 21:12:32 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
|
2012-07-31 10:36:00 +04:00
|
|
|
NS_DECL_NSILOADCONTEXT
|
2010-10-20 21:12:32 +04:00
|
|
|
|
|
|
|
nsresult
|
2012-08-23 23:33:46 +04:00
|
|
|
Schedule(const URIParams& manifestURI,
|
|
|
|
const URIParams& documentURI,
|
2010-10-20 21:12:32 +04:00
|
|
|
const bool& stickDocument);
|
|
|
|
|
2012-12-29 13:02:16 +04:00
|
|
|
OfflineCacheUpdateParent(uint32_t aAppId, bool aIsInBrowser);
|
2010-10-20 21:12:32 +04:00
|
|
|
~OfflineCacheUpdateParent();
|
|
|
|
|
2010-12-22 18:44:27 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why);
|
|
|
|
|
2010-10-20 21:12:32 +04:00
|
|
|
private:
|
|
|
|
void RefcountHitZero();
|
2010-12-22 18:44:27 +03:00
|
|
|
bool mIPCClosed;
|
2012-07-31 10:36:00 +04:00
|
|
|
|
|
|
|
bool mIsInBrowserElement;
|
|
|
|
uint32_t mAppId;
|
2010-10-20 21:12:32 +04:00
|
|
|
};
|
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
} // namespace docshell
|
|
|
|
} // namespace mozilla
|
2010-10-20 21:12:32 +04:00
|
|
|
|
|
|
|
#endif
|