Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / netwerk / base / LoadContextInfo.h
blobbf6c4ca0edec7cd2f69f82eff2f1257b77631a80
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsLoadContextInfo_h__
6 #define nsLoadContextInfo_h__
8 #include "nsILoadContextInfo.h"
10 class nsIChannel;
11 class nsILoadContext;
13 namespace mozilla {
14 namespace net {
16 class LoadContextInfo final : public nsILoadContextInfo {
17 public:
18 NS_DECL_THREADSAFE_ISUPPORTS
19 NS_DECL_NSILOADCONTEXTINFO
21 LoadContextInfo(bool aIsAnonymous, OriginAttributes aOriginAttributes);
23 private:
24 virtual ~LoadContextInfo() = default;
26 protected:
27 bool mIsAnonymous : 1;
28 OriginAttributes mOriginAttributes;
31 class LoadContextInfoFactory : public nsILoadContextInfoFactory {
32 virtual ~LoadContextInfoFactory() = default;
34 public:
35 NS_DECL_ISUPPORTS // deliberately not thread-safe
36 NS_DECL_NSILOADCONTEXTINFOFACTORY
39 LoadContextInfo* GetLoadContextInfo(nsIChannel* aChannel);
41 LoadContextInfo* GetLoadContextInfo(nsILoadContext* aLoadContext,
42 bool aIsAnonymous);
44 LoadContextInfo* GetLoadContextInfo(nsIDOMWindow* aLoadContext,
45 bool aIsAnonymous);
47 LoadContextInfo* GetLoadContextInfo(nsILoadContextInfo* aInfo);
49 LoadContextInfo* GetLoadContextInfo(bool const aIsAnonymous,
50 OriginAttributes const& aOriginAttributes);
52 } // namespace net
53 } // namespace mozilla
55 #endif