Sat, 03 Jan 2015 20:18:00 +0100
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.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsXBLPrototypeResources_h__
7 #define nsXBLPrototypeResources_h__
9 #include "nsAutoPtr.h"
10 #include "nsICSSLoaderObserver.h"
11 #include "nsIStyleRuleProcessor.h"
13 class nsIContent;
14 class nsIAtom;
15 class nsXBLResourceLoader;
16 class nsXBLPrototypeBinding;
17 class nsCSSStyleSheet;
19 // *********************************************************************/
20 // The XBLPrototypeResources class
22 class nsXBLPrototypeResources
23 {
24 public:
25 nsXBLPrototypeResources(nsXBLPrototypeBinding* aBinding);
26 ~nsXBLPrototypeResources();
28 void LoadResources(bool* aResult);
29 void AddResource(nsIAtom* aResourceType, const nsAString& aSrc);
30 void AddResourceListener(nsIContent* aElement);
31 nsresult FlushSkinSheets();
33 nsresult Write(nsIObjectOutputStream* aStream);
35 void Traverse(nsCycleCollectionTraversalCallback &cb) const;
37 void ClearLoader();
39 typedef nsTArray<nsRefPtr<nsCSSStyleSheet> > sheet_array_type;
41 private:
42 // A loader object. Exists only long enough to load resources, and then it dies.
43 nsRefPtr<nsXBLResourceLoader> mLoader;
45 public:
46 // A list of loaded stylesheets for this binding.
47 sheet_array_type mStyleSheetList;
49 // The list of stylesheets converted to a rule processor.
50 nsCOMPtr<nsIStyleRuleProcessor> mRuleProcessor;
51 };
53 #endif