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