Commit 93e10d47 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Introduce QuicTransport

This is the first CL to implement QuicTransport. This CL
 - creates a directory in blink,
 - introduces a new blink runtime feature flag, and
 - defines QuicTransport IDL interface behind the flag,

Bug: 1011392
Change-Id: Id432cee2b6d5df6ab4a4c3e8aa6828d5a7937dd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868569Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707303}
parent 6d468d14
......@@ -150,6 +150,7 @@ jumbo_component("modules") {
"//third_party/blink/renderer/modules/webmidi",
"//third_party/blink/renderer/modules/webshare",
"//third_party/blink/renderer/modules/websockets",
"//third_party/blink/renderer/modules/webtransport",
"//third_party/blink/renderer/modules/webusb",
"//third_party/blink/renderer/modules/worklet",
"//third_party/blink/renderer/modules/xr",
......@@ -458,6 +459,7 @@ jumbo_source_set("unit_tests") {
"//third_party/blink/renderer/modules/gamepad:unit_tests",
"//third_party/blink/renderer/modules/hid:unit_tests",
"//third_party/blink/renderer/modules/storage:unit_tests",
"//third_party/blink/renderer/modules/webtransport:unit_tests",
"//third_party/blink/renderer/platform",
"//third_party/blink/renderer/platform/wtf",
"//third_party/opus",
......
......@@ -497,6 +497,7 @@ modules_idl_files =
"websockets/close_event.idl",
"websockets/websocket.idl",
"websockets/websocket_stream.idl",
"webtransport/quic_transport.idl",
"webusb/usb.idl",
"webusb/usb_alternate_interface.idl",
"webusb/usb_configuration.idl",
......
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//third_party/blink/renderer/modules/modules.gni")
blink_modules_sources("webtransport") {
sources = [
"quic_transport.cc",
"quic_transport.h",
]
}
jumbo_source_set("unit_tests") {
testonly = true
sources = []
configs += [
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer/core:blink_core_pch",
]
deps = [
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/renderer/modules",
"//third_party/blink/renderer/platform",
"//third_party/blink/renderer/platform/wtf",
]
}
ricea@chromium.org
yhirano@chromium.org
# TEAM: blink-network-dev@chromium.org
# COMPONENT: Blink>Network>WebTransport
# WebTransport API
This is a directory for [Web Transport](https://wicg.github.io/web-transport/)
implementation.
## Design docs
- [QuicTransport](https://docs.google.com/document/d/1UgviRBnZkMUq4OKcsAJvIQFX6UCXeCbOtX_wMgwD_es/edit)
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/webtransport/quic_transport.h"
namespace blink {
QuicTransport::QuicTransport(ScriptState* script_state, const String& url) {}
void QuicTransport::Dispose() {}
} // namespace blink
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBTRANSPORT_QUIC_TRANSPORT_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBTRANSPORT_QUIC_TRANSPORT_H_
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
namespace blink {
class ScriptState;
class MODULES_EXPORT QuicTransport final : public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
USING_PRE_FINALIZER(QuicTransport, Dispose);
public:
static QuicTransport* Create(ScriptState* script_state, const String& url) {
return MakeGarbageCollected<QuicTransport>(script_state, url);
}
QuicTransport(ScriptState*, const String& url);
~QuicTransport() override = default;
private:
void Dispose();
};
} // namespace blink
#endif
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://wicg.github.io/web-transport/#quic-transport
[
Constructor(USVString url),
Exposed=(Window, Worker),
RuntimeEnabled=QuicTransport,
ConstructorCallWith=ScriptState
] interface QuicTransport {
// QuicTransport is the first, and at this moment only, transport which is
// implemented. In the (draft) spec there are many mix-in interfaces which
// QuicTransport includes, but we define all their methods/attributes here
// for simplicity.
};
......@@ -1343,6 +1343,10 @@
name: "PushMessagingSubscriptionChange",
status: "experimental",
},
{
name: "QuicTransport",
status: "experimental",
},
{
name: "ReducedReferrerGranularity",
},
......
......@@ -1219,6 +1219,9 @@ interface PushSubscriptionOptions
getter applicationServerKey
getter userVisibleOnly
method constructor
interface QuicTransport
attribute @@toStringTag
method constructor
interface ReadableStream
attribute @@toStringTag
getter locked
......
......@@ -1154,6 +1154,9 @@ Starting worker: resources/global-interface-listing-worker.js
[Worker] getter applicationServerKey
[Worker] getter userVisibleOnly
[Worker] method constructor
[Worker] interface QuicTransport
[Worker] attribute @@toStringTag
[Worker] method constructor
[Worker] interface ReadableStream
[Worker] attribute @@toStringTag
[Worker] getter locked
......
......@@ -5965,6 +5965,9 @@ interface PushSubscriptionOptions
getter applicationServerKey
getter userVisibleOnly
method constructor
interface QuicTransport
attribute @@toStringTag
method constructor
interface RTCCertificate
attribute @@toStringTag
getter expires
......
......@@ -1136,6 +1136,9 @@ Starting worker: resources/global-interface-listing-worker.js
[Worker] getter applicationServerKey
[Worker] getter userVisibleOnly
[Worker] method constructor
[Worker] interface QuicTransport
[Worker] attribute @@toStringTag
[Worker] method constructor
[Worker] interface ReadableStream
[Worker] attribute @@toStringTag
[Worker] getter locked
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment