diff options
Diffstat (limited to 'dom/webtransport/child')
-rw-r--r-- | dom/webtransport/child/WebTransportChild.h | 43 | ||||
-rw-r--r-- | dom/webtransport/child/moz.build | 13 |
2 files changed, 56 insertions, 0 deletions
diff --git a/dom/webtransport/child/WebTransportChild.h b/dom/webtransport/child/WebTransportChild.h new file mode 100644 index 0000000000..3aa7c8d8e2 --- /dev/null +++ b/dom/webtransport/child/WebTransportChild.h @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef DOM_WEBTRANSPORT_WEBTRANSPORTCHILD_H_ +#define DOM_WEBTRANSPORT_WEBTRANSPORTCHILD_H_ + +#include "mozilla/dom/PWebTransportChild.h" +#include "nsISupportsImpl.h" + +namespace mozilla::dom { + +class WebTransportChild : public PWebTransportChild { + public: + NS_INLINE_DECL_REFCOUNTING(WebTransportChild) + + virtual void CloseAll() { + // XXX need impl + } + + virtual void Shutdown() { + if (!CanSend()) { + return; + } + + Close(); + } + + ::mozilla::ipc::IPCResult RecvCloseAll(CloseAllResolver&& aResolver) { + CloseAll(); + aResolver(NS_OK); + return IPC_OK(); + } + + protected: + virtual ~WebTransportChild() = default; +}; + +} // namespace mozilla::dom + +#endif // DOM_WEBTRANSPORT_WEBTRANSPORTCHILD_H_ diff --git a/dom/webtransport/child/moz.build b/dom/webtransport/child/moz.build new file mode 100644 index 0000000000..dd86788857 --- /dev/null +++ b/dom/webtransport/child/moz.build @@ -0,0 +1,13 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +EXPORTS.mozilla.dom += [ + "WebTransportChild.h", +] + +FINAL_LIBRARY = "xul" + +include("/ipc/chromium/chromium-config.mozbuild") |