Files
palemoon27/uriloader/prefetch/OfflineCacheUpdateChild.h
T
roytam1 c317230594 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1242724: add an export of runnable_utils.h unless/until it gets moved to xpcom/mfbt r=glandium (1d5e839f99)
- Bug 1223240 - Make it easier to set up top-level protocols (r=jld) (3beaf4a6fa)
- Bug 1194259: Make ICE IP restriction to default routes work in E10S r=jesup,mcmanus,drno (cbe463cf27)
- Bug 1239584, Part 1 - Add nsIPushNotifier and nsIPushMessage interfaces. r=dragana (7b71518e7d)
- Bug 1239584, Part 2 - Remove message manager usage from `PushService.jsm`. r=dragana (f76ab36278)
- Bug 1210211 - Part 3: Test for push notification quota with web notifications. r=kitcambridge (f37472f9b2)
- Bug 1189998, Part 3 - Update consolidated Push tests. r=mt (fae3b02e6e)
- Bug 1225968 - Refactor data delivery tests to support addition of new tests, r=kitcambridge (3163083135)
- Bug 1225968 - Adding more messages to the push message tests, r=kitcambridge (7e1bac99ba)
- Bug 1239558 - Exempt system Push subscriptions from quota and permissions checks. r=dragana (0dd8399414)
- Bug 1239584, Part 3 - Update tests. r=dragana (937e339387)
- Bug 1165256 - Make appcache fully work with OriginAttribues. r=jduell (91d666752a)
- reapply Bug 1232506: Make dom/devicestorage really work with e10s. r=alchen (bd77941ea9)
- Bug 1236433 - Part 1: Provide a Native Wrapper to Allow Fallback Whenproperty_get/set is Unavailable; r=edgar (f9026a7f50)
- Bug 1168959 - Memory-safety bugs in NetworkUtils.cpp generally. r=fabrice (13c6c14168)
- Bug 1236433 - Part 2: Adopt Wrapper in Network Utilities; r=edgar (dde58ea083)
- Bug 1209654 - Modify the type of the threshold of addAlarm() and getAllAlarms() to long long from long, and add test cases. r=ettseng, r=bz (79c7e31440)
- Bug 1000040 - Part 1: Add required APIs for Ethernet; r=vicamo,bholley (fcff7c8078)
- Bug 1231306 - Handle plugin state changes correctly in content process (r=jimm) (1f2daa6ad4)
- Bug 1213454: Ensure that mSupportsAsyncInit is propagated from content process; r=jimm (e86f36fe0a)
- Bug 1246574 - Store sandbox level to nsPluginTag for e10s. r=jimm (04617c8d28)
- Bug 1201904 - Force windowless mode for Flash when sandbox level >= 2. r=bsmedberg (662c6612a2)
- Bug 1233619 (part 1) - Remove unneeded gfxContext argument from EndUpdate() and EndUpdateBackground() functions. r=roc. (1f74728aec)
- Bug 1233619 (part 2) - Moz2Dify BeginUpdate() and BeginUpdateBackground() functions. r=roc. (36accc1499)
- Bug 1243656 - Use async for RequestCommitOrCancel. r=masayuki (aa57ea37dc)
- Bug 1243268 - Support ImmSetCandidateWindow(CFS_EXCLUDE) on plugin process. r=masayuki (78975bd3e4)
- Bug 1235573 - Don't post GCS_RESULTSTR when plugin doesn't handle WM_IME_COMPOSITION correctly. r=masayuki (11690062a3)
- Bug 1173371 Part 1: Take Chromium commit 0e49d029d5a1a25d971880b9e44d67ac70b31a80 for sandbox code. r=aklotz (517cb91822)
- Bug 1157864 - Record chromium patch applied in previous commit. r=me (dc1e63191b)
- Bug 1173371 Part 2: Change Chromium sandbox to allow rules for files on network drives to be added. a=aklotz (2bd72777e5)
- Bug 1173371 Part 3: Add sandbox policy rule to allow read access to the Firefox program directory when it is on a network drive. r=aklotz (c0a180d4b8)
- Bug 1244774: Correct wchar_t/char16_t VS2015 compilation problem caused by patches for bug 1173371. r=jimm (d5326694f8)
2023-08-17 14:45:22 +08:00

93 lines
2.5 KiB
C++

/* -*- 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 nsOfflineCacheUpdateChild_h
#define nsOfflineCacheUpdateChild_h
#include "mozilla/docshell/POfflineCacheUpdateChild.h"
#include "nsIOfflineCacheUpdate.h"
#include "nsCOMArray.h"
#include "nsCOMPtr.h"
#include "nsIDOMDocument.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsIURI.h"
#include "nsString.h"
#include "nsWeakReference.h"
namespace mozilla {
namespace docshell {
class OfflineCacheUpdateChild : public nsIOfflineCacheUpdate
, public POfflineCacheUpdateChild
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOFFLINECACHEUPDATE
virtual bool
RecvNotifyStateEvent(const uint32_t& stateEvent,
const uint64_t& byteProgress) override;
virtual bool
RecvAssociateDocuments(
const nsCString& cacheGroupId,
const nsCString& cacheClientId) override;
virtual bool
RecvFinish(const bool& succeeded,
const bool& isUpgrade) override;
explicit OfflineCacheUpdateChild(nsIDOMWindow* aWindow);
void SetDocument(nsIDOMDocument *aDocument);
private:
~OfflineCacheUpdateChild();
nsresult AssociateDocument(nsIDOMDocument *aDocument,
nsIApplicationCache *aApplicationCache);
void GatherObservers(nsCOMArray<nsIOfflineCacheUpdateObserver> &aObservers);
nsresult Finish();
enum {
STATE_UNINITIALIZED,
STATE_INITIALIZED,
STATE_CHECKING,
STATE_DOWNLOADING,
STATE_CANCELLED,
STATE_FINISHED
} mState;
bool mIsUpgrade;
bool mSucceeded;
nsCString mUpdateDomain;
nsCOMPtr<nsIURI> mManifestURI;
nsCOMPtr<nsIURI> mDocumentURI;
nsCOMPtr<nsIPrincipal> mLoadingPrincipal;
nsCOMPtr<nsIObserverService> mObserverService;
/* Clients watching this update for changes */
nsCOMArray<nsIWeakReference> mWeakObservers;
nsCOMArray<nsIOfflineCacheUpdateObserver> mObservers;
/* Document that requested this update */
nsCOMPtr<nsIDOMDocument> mDocument;
/* Keep reference to the window that owns this update to call the
parent offline cache update construcor */
nsCOMPtr<nsIDOMWindow> mWindow;
uint64_t mByteProgress;
};
} // namespace docshell
} // namespace mozilla
#endif