1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 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_dom_quota_checkquotahelper_h__
8 #define mozilla_dom_quota_checkquotahelper_h__
10 #include "QuotaCommon.h"
12 #include "nsIInterfaceRequestor.h"
13 #include "nsIObserver.h"
14 #include "nsIRunnable.h"
16 #include "mozilla/CondVar.h"
17 #include "mozilla/Mutex.h"
24 class CheckQuotaHelper MOZ_FINAL
: public nsIRunnable
,
25 public nsIInterfaceRequestor
,
29 NS_DECL_THREADSAFE_ISUPPORTS
31 NS_DECL_NSIINTERFACEREQUESTOR
34 CheckQuotaHelper(nsPIDOMWindow
* aWindow
,
35 mozilla::Mutex
& aMutex
);
38 PromptAndReturnQuotaIsDisabled();
44 GetQuotaPermission(nsIPrincipal
* aPrincipal
);
49 nsPIDOMWindow
* mWindow
;
51 mozilla::Mutex
& mMutex
;
52 mozilla::CondVar mCondVar
;
53 uint32_t mPromptResult
;
60 #endif // mozilla_dom_quota_checkquotahelper_h__