1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ 3 4/* This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 8include protocol PBackground; 9include NeckoChannelParams; 10include PURLClassifierInfo; 11 12include "mozilla/net/NeckoMessageUtils.h"; 13 14using class nsHttpHeaderArray from "nsHttpHeaderArray.h"; 15using struct mozilla::net::ResourceTimingStruct from "mozilla/net/TimingStruct.h"; 16 17namespace mozilla { 18namespace net { 19 20//------------------------------------------------------------------- 21async protocol PHttpBackgroundChannel 22{ 23 manager PBackground; 24 25child: 26 // OnStartRequest is sent over main thread IPC. The following 27 // OnTransportAndData/OnStopRequest/OnProgress/OnStatus/FlushForDiversion/ 28 // DivertMessages needs to wait in content process until OnStartRequest 29 // is processed. For synchronizing the event sequence. 30 async OnStartRequestSent(); 31 32 // Combines a single OnDataAvailable and its associated OnProgress & 33 // OnStatus calls into one IPDL message 34 async OnTransportAndData(nsresult channelStatus, 35 nsresult transportStatus, 36 uint64_t offset, 37 uint32_t count, 38 nsCString data); 39 40 async OnStopRequest(nsresult channelStatus, 41 ResourceTimingStruct timing, 42 TimeStamp lastActiveTabOptimization, 43 nsHttpHeaderArray responseTrailers); 44 45 async OnProgress(int64_t progress, int64_t progressMax); 46 47 async OnStatus(nsresult status); 48 49 // Parent has been suspended for diversion; no more events to be enqueued. 50 async FlushedForDiversion(); 51 52 // Child should resume processing the ChannelEventQueue, i.e. diverting any 53 // OnDataAvailable and OnStopRequest messages in the queue back to the parent. 54 async DivertMessages(); 55 56 // Tell the child that tracking protection was disabled for this load. 57 async NotifyTrackingProtectionDisabled(); 58 59 // Tell the child that the resource being loaded is on the tracking 60 // protection list. 61 async NotifyTrackingResource(); 62 63 // Tell the child information of matched URL againts SafeBrowsing list 64 async SetClassifierMatchedInfo(ClassifierInfo info); 65 66 async __delete__(); 67 68}; 69 70 71} // namespace net 72} // namespace mozilla 73