QuotaUsageRequestChild.h (1365B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=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 file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef DOM_QUOTA_QUOTAUSAGEREQUESTCHILD_H_ 8 #define DOM_QUOTA_QUOTAUSAGEREQUESTCHILD_H_ 9 10 #include "mozilla/RefPtr.h" 11 #include "mozilla/dom/quota/PQuotaUsageRequestChild.h" 12 #include "nsISupportsImpl.h" 13 14 namespace mozilla::dom::quota { 15 16 class QuotaManagerService; 17 class UsageRequest; 18 19 class QuotaUsageRequestChild final : public PQuotaUsageRequestChild { 20 friend class QuotaChild; 21 friend class QuotaManagerService; 22 23 RefPtr<UsageRequest> mRequest; 24 25 public: 26 void AssertIsOnOwningThread() const 27 #ifdef DEBUG 28 ; 29 #else 30 { 31 } 32 #endif 33 34 NS_INLINE_DECL_REFCOUNTING(QuotaUsageRequestChild, override) 35 36 // IPDL methods are only called by IPDL. 37 virtual mozilla::ipc::IPCResult Recv__delete__() override; 38 39 private: 40 // Only created by QuotaManagerService. 41 explicit QuotaUsageRequestChild(UsageRequest* aRequest); 42 43 // Only destroyed by QuotaChild. 44 ~QuotaUsageRequestChild(); 45 46 virtual void ActorDestroy(ActorDestroyReason aWhy) override; 47 }; 48 49 } // namespace mozilla::dom::quota 50 51 #endif // DOM_QUOTA_QUOTAUSAGEREQUESTCHILD_H_