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.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef mozilla_dom_IccManager_h |
michael@0 | 6 | #define mozilla_dom_IccManager_h |
michael@0 | 7 | |
michael@0 | 8 | #include "mozilla/DOMEventTargetHelper.h" |
michael@0 | 9 | #include "nsCycleCollectionParticipant.h" |
michael@0 | 10 | #include "nsIIccProvider.h" |
michael@0 | 11 | #include "nsTArrayHelpers.h" |
michael@0 | 12 | |
michael@0 | 13 | namespace mozilla { |
michael@0 | 14 | namespace dom { |
michael@0 | 15 | |
michael@0 | 16 | class IccListener; |
michael@0 | 17 | |
michael@0 | 18 | class IccManager MOZ_FINAL : public DOMEventTargetHelper |
michael@0 | 19 | { |
michael@0 | 20 | public: |
michael@0 | 21 | NS_DECL_ISUPPORTS_INHERITED |
michael@0 | 22 | |
michael@0 | 23 | NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) |
michael@0 | 24 | |
michael@0 | 25 | NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager, DOMEventTargetHelper) |
michael@0 | 26 | |
michael@0 | 27 | IccManager(nsPIDOMWindow* aWindow); |
michael@0 | 28 | ~IccManager(); |
michael@0 | 29 | |
michael@0 | 30 | void |
michael@0 | 31 | Shutdown(); |
michael@0 | 32 | |
michael@0 | 33 | nsresult |
michael@0 | 34 | NotifyIccAdd(const nsAString& aIccId); |
michael@0 | 35 | |
michael@0 | 36 | nsresult |
michael@0 | 37 | NotifyIccRemove(const nsAString& aIccId); |
michael@0 | 38 | |
michael@0 | 39 | IMPL_EVENT_HANDLER(iccdetected) |
michael@0 | 40 | IMPL_EVENT_HANDLER(iccundetected) |
michael@0 | 41 | |
michael@0 | 42 | void |
michael@0 | 43 | GetIccIds(nsTArray<nsString>& aIccIds); |
michael@0 | 44 | |
michael@0 | 45 | already_AddRefed<nsISupports> |
michael@0 | 46 | GetIccById(const nsAString& aIccId) const; |
michael@0 | 47 | |
michael@0 | 48 | nsPIDOMWindow* |
michael@0 | 49 | GetParentObject() const { return GetOwner(); } |
michael@0 | 50 | |
michael@0 | 51 | virtual JSObject* |
michael@0 | 52 | WrapObject(JSContext* aCx) MOZ_OVERRIDE; |
michael@0 | 53 | |
michael@0 | 54 | private: |
michael@0 | 55 | nsTArray<nsRefPtr<IccListener>> mIccListeners; |
michael@0 | 56 | }; |
michael@0 | 57 | |
michael@0 | 58 | } // namespace dom |
michael@0 | 59 | } // namespace mozilla |
michael@0 | 60 | |
michael@0 | 61 | #endif // mozilla_dom_IccManager_h |