dom/xbl/nsXBLResourceLoader.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsXBLResourceLoader_h
michael@0 7 #define nsXBLResourceLoader_h
michael@0 8
michael@0 9 #include "mozilla/Attributes.h"
michael@0 10 #include "nsCOMPtr.h"
michael@0 11 #include "nsICSSLoaderObserver.h"
michael@0 12 #include "nsCOMArray.h"
michael@0 13 #include "nsCycleCollectionParticipant.h"
michael@0 14
michael@0 15 class nsIContent;
michael@0 16 class nsIAtom;
michael@0 17 class nsXBLPrototypeResources;
michael@0 18 class nsXBLPrototypeBinding;
michael@0 19 struct nsXBLResource;
michael@0 20 class nsIObjectOutputStream;
michael@0 21
michael@0 22 // *********************************************************************/
michael@0 23 // The XBLResourceLoader class
michael@0 24
michael@0 25 class nsXBLResourceLoader : public nsICSSLoaderObserver
michael@0 26 {
michael@0 27 public:
michael@0 28 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
michael@0 29 NS_DECL_CYCLE_COLLECTION_CLASS(nsXBLResourceLoader)
michael@0 30
michael@0 31 // nsICSSLoaderObserver
michael@0 32 NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate,
michael@0 33 nsresult aStatus) MOZ_OVERRIDE;
michael@0 34
michael@0 35 void LoadResources(bool* aResult);
michael@0 36 void AddResource(nsIAtom* aResourceType, const nsAString& aSrc);
michael@0 37 void AddResourceListener(nsIContent* aElement);
michael@0 38
michael@0 39 nsXBLResourceLoader(nsXBLPrototypeBinding* aBinding,
michael@0 40 nsXBLPrototypeResources* aResources);
michael@0 41 virtual ~nsXBLResourceLoader();
michael@0 42
michael@0 43 void NotifyBoundElements();
michael@0 44
michael@0 45 nsresult Write(nsIObjectOutputStream* aStream);
michael@0 46
michael@0 47 // MEMBER VARIABLES
michael@0 48 nsXBLPrototypeBinding* mBinding; // A pointer back to our binding.
michael@0 49 nsXBLPrototypeResources* mResources; // A pointer back to our resources
michael@0 50 // information. May be null if the
michael@0 51 // resources have already been
michael@0 52 // destroyed.
michael@0 53
michael@0 54 nsXBLResource* mResourceList; // The list of resources we need to load.
michael@0 55 nsXBLResource* mLastResource;
michael@0 56
michael@0 57 bool mLoadingResources;
michael@0 58 // We need mInLoadResourcesFunc because we do a mixture of sync and
michael@0 59 // async loads.
michael@0 60 bool mInLoadResourcesFunc;
michael@0 61 int16_t mPendingSheets; // The number of stylesheets that have yet to load.
michael@0 62
michael@0 63 // Bound elements that are waiting on the stylesheets and scripts.
michael@0 64 nsCOMArray<nsIContent> mBoundElements;
michael@0 65 };
michael@0 66
michael@0 67 #endif

mercurial