BackgroundDataBridgeChild.h (1397B)
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_BackgroundDataBridgeChild_h 6 #define mozilla_net_BackgroundDataBridgeChild_h 7 8 #include "mozilla/net/PBackgroundDataBridgeChild.h" 9 #include "mozilla/ipc/BackgroundChild.h" 10 11 namespace mozilla { 12 namespace net { 13 14 class HttpBackgroundChannelChild; 15 16 class BackgroundDataBridgeChild final : public PBackgroundDataBridgeChild { 17 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BackgroundDataBridgeChild, override) 18 19 explicit BackgroundDataBridgeChild(HttpBackgroundChannelChild* aBgChild); 20 21 protected: 22 virtual ~BackgroundDataBridgeChild(); 23 void ActorDestroy(ActorDestroyReason aWhy) override; 24 25 RefPtr<HttpBackgroundChannelChild> mBgChild; 26 27 public: 28 mozilla::ipc::IPCResult RecvOnTransportAndData( 29 const uint64_t& offset, const uint32_t& count, const nsACString& data, 30 const TimeStamp& aOnDataAvailableStartTime); 31 mozilla::ipc::IPCResult RecvOnStopRequest( 32 nsresult aStatus, const ResourceTimingStructArgs& aTiming, 33 const TimeStamp& aLastActiveTabOptHit, 34 const nsHttpHeaderArray& aResponseTrailers, 35 const TimeStamp& aOnStopRequestStartTime); 36 }; 37 38 } // namespace net 39 } // namespace mozilla 40 41 #endif // mozilla_net_BackgroundDataBridgeChild_h