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 nsCookiePermission_h__
6 #define nsCookiePermission_h__
8 #include "nsICookiePermission.h"
9 #include "nsPermissionManager.h"
11 class nsCookiePermission final
: public nsICookiePermission
{
14 NS_DECL_NSICOOKIEPERMISSION
17 static already_AddRefed
<nsICookiePermission
> GetOrCreate();
22 ~nsCookiePermission() = default;
24 bool EnsureInitialized() { return (mPermMgr
!= nullptr) || Init(); };
26 RefPtr
<nsPermissionManager
> mPermMgr
;