uriloader/prefetch/OfflineCacheUpdateParent.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/uriloader/prefetch/OfflineCacheUpdateParent.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsOfflineCacheUpdateParent_h
    1.10 +#define nsOfflineCacheUpdateParent_h
    1.11 +
    1.12 +#include "mozilla/docshell/POfflineCacheUpdateParent.h"
    1.13 +#include "nsIOfflineCacheUpdate.h"
    1.14 +
    1.15 +#include "nsString.h"
    1.16 +#include "nsILoadContext.h"
    1.17 +
    1.18 +namespace mozilla {
    1.19 +
    1.20 +namespace dom {
    1.21 +class TabParent;
    1.22 +}
    1.23 +
    1.24 +namespace ipc {
    1.25 +class URIParams;
    1.26 +} // namespace ipc
    1.27 +
    1.28 +namespace docshell {
    1.29 +
    1.30 +class OfflineCacheUpdateParent : public POfflineCacheUpdateParent
    1.31 +                               , public nsIOfflineCacheUpdateObserver
    1.32 +                               , public nsILoadContext
    1.33 +{
    1.34 +    typedef mozilla::ipc::URIParams URIParams;
    1.35 +
    1.36 +public:
    1.37 +    NS_DECL_ISUPPORTS
    1.38 +    NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
    1.39 +    NS_DECL_NSILOADCONTEXT
    1.40 +
    1.41 +    nsresult
    1.42 +    Schedule(const URIParams& manifestURI,
    1.43 +             const URIParams& documentURI,
    1.44 +             const bool& stickDocument);
    1.45 +
    1.46 +    void
    1.47 +    StopSendingMessagesToChild()
    1.48 +    {
    1.49 +      mIPCClosed = true;
    1.50 +    }
    1.51 +
    1.52 +    OfflineCacheUpdateParent(uint32_t aAppId, bool aIsInBrowser);
    1.53 +    ~OfflineCacheUpdateParent();
    1.54 +
    1.55 +    virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
    1.56 +
    1.57 +private:
    1.58 +    bool mIPCClosed;
    1.59 +
    1.60 +    bool     mIsInBrowserElement;
    1.61 +    uint32_t mAppId;
    1.62 +};
    1.63 +
    1.64 +} // namespace docshell
    1.65 +} // namespace mozilla
    1.66 +
    1.67 +#endif

mercurial