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 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_SpeechGrammarList_h
8 #define mozilla_dom_SpeechGrammarList_h
10 #include "mozilla/Attributes.h"
11 #include "nsCOMPtr.h"
12 #include "nsCycleCollectionParticipant.h"
13 #include "nsWrapperCache.h"
15 struct JSContext;
17 namespace mozilla {
19 class ErrorResult;
21 namespace dom {
23 class GlobalObject;
24 class SpeechGrammar;
25 template<typename> class Optional;
27 class SpeechGrammarList MOZ_FINAL : public nsISupports,
28 public nsWrapperCache
29 {
30 public:
31 SpeechGrammarList(nsISupports* aParent);
32 ~SpeechGrammarList();
34 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
35 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammarList)
37 SpeechGrammarList* Constructor(const GlobalObject& aGlobal,
38 ErrorResult& aRv);
40 nsISupports* GetParentObject() const;
42 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
44 uint32_t Length() const;
46 already_AddRefed<SpeechGrammar> Item(uint32_t aIndex, ErrorResult& aRv);
48 void AddFromURI(const nsAString& aSrc, const Optional<float>& aWeight, ErrorResult& aRv);
50 void AddFromString(const nsAString& aString, const Optional<float>& aWeight, ErrorResult& aRv);
52 already_AddRefed<SpeechGrammar> IndexedGetter(uint32_t aIndex, bool& aPresent, ErrorResult& aRv);
54 private:
55 nsCOMPtr<nsISupports> mParent;
56 };
58 } // namespace dom
59 } // namespace mozilla
61 #endif