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 nsStreamTransportService_h__
6 #define nsStreamTransportService_h__
8 #include "nsIStreamTransportService.h"
9 #include "nsIEventTarget.h"
10 #include "nsIObserver.h"
13 #include "nsThreadUtils.h"
14 #include "mozilla/Attributes.h"
15 #include "mozilla/DataMutex.h"
16 #include "mozilla/Mutex.h"
23 class nsStreamTransportService final
: public nsIStreamTransportService
,
24 public nsIEventTarget
,
27 NS_DECL_THREADSAFE_ISUPPORTS
28 NS_DECL_NSISTREAMTRANSPORTSERVICE
29 NS_DECL_NSIEVENTTARGET_FULL
34 nsStreamTransportService();
37 ~nsStreamTransportService();
39 nsCOMPtr
<nsIThreadPool
> mPool
MOZ_GUARDED_BY(mShutdownLock
);
41 mozilla::Mutex mShutdownLock
{"nsStreamTransportService.mShutdownLock"};
42 bool mIsShutdown
MOZ_GUARDED_BY(mShutdownLock
){false};
46 } // namespace mozilla