BackgroundDataBridgeParent.h (1263B)
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/. */ 4 5 #ifndef mozilla_net_BackgroundDataBridgeParent_h 6 #define mozilla_net_BackgroundDataBridgeParent_h 7 8 #include "mozilla/net/PBackgroundDataBridgeParent.h" 9 10 namespace mozilla { 11 namespace net { 12 13 class BackgroundDataBridgeParent final : public PBackgroundDataBridgeParent { 14 public: 15 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BackgroundDataBridgeParent, override) 16 17 explicit BackgroundDataBridgeParent(uint64_t aChannelID); 18 void ActorDestroy(ActorDestroyReason aWhy) override; 19 already_AddRefed<nsISerialEventTarget> GetBackgroundThread(); 20 void Destroy(); 21 void OnStopRequest(nsresult aStatus, const ResourceTimingStructArgs& aTiming, 22 const TimeStamp& aLastActiveTabOptHit, 23 const nsHttpHeaderArray& aResponseTrailers, 24 const TimeStamp& aOnStopRequestStart); 25 26 private: 27 virtual ~BackgroundDataBridgeParent() = default; 28 29 uint64_t mChannelID; 30 nsCOMPtr<nsISerialEventTarget> mBackgroundThread; 31 }; 32 33 } // namespace net 34 } // namespace mozilla 35 36 #endif // mozilla_net_BackgroundDataBridgeParent_h