Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / netwerk / base / nsStreamTransportService.h
blob187db4f87cd624c9d2158b549b020adb1b27466c
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"
11 #include "nsCOMPtr.h"
12 #include "nsThreadUtils.h"
13 #include "mozilla/Attributes.h"
14 #include "mozilla/Mutex.h"
16 class nsIThreadPool;
18 namespace mozilla {
19 namespace net {
21 class nsStreamTransportService final : public nsIStreamTransportService,
22 public nsIEventTarget,
23 public nsIObserver {
24 public:
25 NS_DECL_THREADSAFE_ISUPPORTS
26 NS_DECL_NSISTREAMTRANSPORTSERVICE
27 NS_DECL_NSIEVENTTARGET_FULL
28 NS_DECL_NSIOBSERVER
30 nsresult Init();
32 nsStreamTransportService()
33 : mShutdownLock("nsStreamTransportService.mShutdownLock"),
34 mIsShutdown(false) {}
36 private:
37 ~nsStreamTransportService();
39 nsCOMPtr<nsIThreadPool> mPool;
41 mozilla::Mutex mShutdownLock;
42 bool mIsShutdown;
45 } // namespace net
46 } // namespace mozilla
47 #endif