uriloader/prefetch/OfflineCacheUpdateParent.h
author Robert O'Callahan <robert@ocallahan.org>
Fri, 07 Dec 2012 12:58:13 +1300
changeset 117116 59b5ec3ba8d3c6b1324bef1ddbda2c661257dca9
parent 116835 81f530168b395aa43b087fafcf65a801f8135430
child 117195 6cd44513d285ac31351cf8911b2e01325acf8ff9
permissions -rw-r--r--
Bug 663776. Part 2: Move TransformRectToRect from nsCSSRendering to gfxUtils. r=mattwoodrow

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */

#ifndef nsOfflineCacheUpdateParent_h
#define nsOfflineCacheUpdateParent_h

#include "mozilla/docshell/POfflineCacheUpdateParent.h"
#include "nsIOfflineCacheUpdate.h"

#include "nsString.h"
#include "nsILoadContext.h"

namespace mozilla {

namespace ipc {
class URIParams;
} // namespace ipc

namespace docshell {

class OfflineCacheUpdateParent : public POfflineCacheUpdateParent
                               , public nsIOfflineCacheUpdateObserver
                               , public nsILoadContext
{
    typedef mozilla::ipc::URIParams URIParams;

public:
    NS_DECL_ISUPPORTS
    NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
    NS_DECL_NSILOADCONTEXT

    nsresult
    Schedule(const URIParams& manifestURI,
             const URIParams& documentURI,
             const bool& isInBrowserElement,
             const uint32_t& appId,
             const bool& stickDocument);

    OfflineCacheUpdateParent();
    ~OfflineCacheUpdateParent();

    virtual void ActorDestroy(ActorDestroyReason why);

private:
    void RefcountHitZero();
    bool mIPCClosed;

    bool     mIsInBrowserElement;
    uint32_t mAppId;
};

} // namespace docshell
} // namespace mozilla

#endif