PNecko.ipdl 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. include protocol PContent;
  6. include protocol PHttpChannel;
  7. include protocol PCookieService;
  8. include protocol PBrowser;
  9. include protocol PWyciwygChannel;
  10. include protocol PFTPChannel;
  11. include protocol PWebSocket;
  12. include protocol PWebSocketEventListener;
  13. include protocol PTCPSocket;
  14. include protocol PTCPServerSocket;
  15. include protocol PUDPSocket;
  16. include protocol PDNSRequest;
  17. include protocol PChannelDiverter;
  18. include protocol PBlob; //FIXME: bug #792908
  19. include protocol PFileDescriptorSet;
  20. include protocol PDataChannel;
  21. include protocol PTransportProvider;
  22. include protocol PSendStream;
  23. include protocol PRtspController;
  24. include protocol PRtspChannel;
  25. include URIParams;
  26. include InputStreamParams;
  27. include NeckoChannelParams;
  28. include PBrowserOrId;
  29. include protocol PAltDataOutputStream;
  30. using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
  31. using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
  32. using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
  33. namespace mozilla {
  34. namespace net {
  35. //-------------------------------------------------------------------
  36. nested(upto inside_cpow) sync protocol PNecko
  37. {
  38. manager PContent;
  39. manages PHttpChannel;
  40. manages PCookieService;
  41. manages PWyciwygChannel;
  42. manages PFTPChannel;
  43. manages PWebSocket;
  44. manages PWebSocketEventListener;
  45. manages PTCPSocket;
  46. manages PTCPServerSocket;
  47. manages PUDPSocket;
  48. manages PDNSRequest;
  49. manages PDataChannel;
  50. manages PRtspController;
  51. manages PRtspChannel;
  52. manages PChannelDiverter;
  53. manages PTransportProvider;
  54. manages PAltDataOutputStream;
  55. parent:
  56. async __delete__();
  57. nested(inside_cpow) async PCookieService();
  58. async PHttpChannel(PBrowserOrId browser,
  59. SerializedLoadContext loadContext,
  60. HttpChannelCreationArgs args);
  61. async PWyciwygChannel();
  62. async PFTPChannel(PBrowserOrId browser, SerializedLoadContext loadContext,
  63. FTPChannelCreationArgs args);
  64. async PWebSocket(PBrowserOrId browser, SerializedLoadContext loadContext,
  65. uint32_t aSerialID);
  66. async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
  67. async PUDPSocket(Principal principal, nsCString filter);
  68. async PDNSRequest(nsCString hostName, uint32_t flags, nsCString networkInterface);
  69. async PWebSocketEventListener(uint64_t aInnerWindowID);
  70. /* Predictor Methods */
  71. async PredPredict(OptionalURIParams targetURI, OptionalURIParams sourceURI,
  72. uint32_t reason, SerializedLoadContext loadContext,
  73. bool hasVerifier);
  74. async PredLearn(URIParams targetURI, OptionalURIParams sourceURI,
  75. uint32_t reason, SerializedLoadContext loadContext);
  76. async PredReset();
  77. async SpeculativeConnect(URIParams uri, Principal principal, bool anonymous);
  78. async HTMLDNSPrefetch(nsString hostname, uint16_t flags);
  79. async CancelHTMLDNSPrefetch(nsString hostname, uint16_t flags, nsresult reason);
  80. /**
  81. * channelId is used to establish a connection between redirect channels in
  82. * the parent and the child when we're redirecting to a data: URI.
  83. */
  84. async PDataChannel(uint32_t channelId);
  85. async PRtspController();
  86. async PRtspChannel(RtspChannelConnectArgs args);
  87. async PChannelDiverter(ChannelDiverterArgs channel);
  88. /**
  89. * These are called from the child with the results of the auth prompt.
  90. * callbackId is the id that was passed in PBrowser::AsyncAuthPrompt,
  91. * corresponding to an nsIAuthPromptCallback
  92. */
  93. async OnAuthAvailable(uint64_t callbackId, nsString user,
  94. nsString password, nsString domain);
  95. async OnAuthCancelled(uint64_t callbackId, bool userCancel);
  96. async RemoveRequestContext(nsCString rcid);
  97. async PAltDataOutputStream(nsCString type, PHttpChannel channel);
  98. child:
  99. /*
  100. * Bring up the http auth prompt for a nested remote mozbrowser.
  101. * NestedFrameId is the id corresponding to the PBrowser. It is the same id
  102. * that was passed to the PBrowserOrId param in to the PHttpChannel constructor
  103. */
  104. async AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
  105. nsString realm, uint64_t callbackId);
  106. /* Predictor Methods */
  107. async PredOnPredictPrefetch(URIParams uri, uint32_t httpStatus);
  108. async PredOnPredictPreconnect(URIParams uri);
  109. async PredOnPredictDNS(URIParams uri);
  110. async SpeculativeConnectRequest();
  111. async PTransportProvider();
  112. both:
  113. // Actually we need PTCPSocket() for parent. But ipdl disallows us having different
  114. // signatures on parent and child. So when constructing the parent side object, we just
  115. // leave host/port unused.
  116. async PTCPSocket(nsString host, uint16_t port);
  117. };
  118. } // namespace net
  119. } // namespace mozilla