| // Copyright 2018 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module network.mojom; |
| |
| import "services/network/public/mojom/p2p.mojom"; |
| |
| // Trusted interfaces for socket-related communication between the browser and |
| // network process |
| |
| // From the network process to the browser process. |
| interface P2PTrustedSocketManagerClient { |
| // Called when the P2PSocketManager client requests socket creation with a |
| // port that's in an invalid range. |
| InvalidSocketPortRangeRequested(); |
| |
| // Called when packet dumping is enabled. |
| DumpPacket(array<uint8> packet_header, |
| uint64 packet_length, |
| bool incoming); |
| }; |
| |
| // From the browser process to the network process. |
| interface P2PTrustedSocketManager { |
| // Starts dumping of packet headers; the incoming/outgoing arguments control |
| // whether incoming or outgoing or both are dumped. |
| StartRtpDump(bool incoming, bool outgoing); |
| // Stops dumping of packet headers; the incoming/outgoing arguments control |
| // whether incoming or outgoing or both are dumped. |
| StopRtpDump(bool incoming, bool outgoing); |
| |
| // Pauses network change notifications for this socket manager. |
| PauseNetworkChangeNotifications(); |
| // Resumes network change notifications for this socket manager. |
| ResumeNetworkChangeNotifications(); |
| }; |