Bumping manifests a=b2g-bump
[gecko.git] / docshell / base / LoadInfo.h
blob915bc94b9c782f7f5cee4c227ee8ba36f2b09dba
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et tw=80 : */
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_LoadInfo_h
8 #define mozilla_LoadInfo_h
10 #include "nsIPrincipal.h"
11 #include "nsILoadInfo.h"
13 namespace mozilla {
15 /**
16 * Class that provides an nsILoadInfo implementation.
18 class LoadInfo MOZ_FINAL : public nsILoadInfo
20 public:
21 NS_DECL_ISUPPORTS
22 NS_DECL_NSILOADINFO
24 enum InheritType
26 eInheritPrincipal,
27 eDontInheritPrincipal
30 enum SandboxType
32 eSandboxed,
33 eNotSandboxed
36 // aPrincipal MUST NOT BE NULL. If aSandboxed is eSandboxed, the
37 // value passed for aInheritPrincipal will be ignored and
38 // eDontInheritPrincipal will be used instead.
39 LoadInfo(nsIPrincipal* aPrincipal,
40 InheritType aInheritPrincipal,
41 SandboxType aSandboxed);
43 private:
44 ~LoadInfo();
46 nsCOMPtr<nsIPrincipal> mPrincipal;
47 bool mInheritPrincipal;
48 bool mSandboxed;
51 } // namespace mozilla
53 #endif // mozilla_LoadInfo_h