Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: webrtc/p2p/quic/quictransport.h

Issue 1856943002: Allow TransportController to create a QuicTransportChannel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Sync to upstream Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/p2p.gyp ('k') | webrtc/p2p/quic/quictransport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/quic/quictransport.h
diff --git a/webrtc/p2p/quic/quictransport.h b/webrtc/p2p/quic/quictransport.h
new file mode 100644
index 0000000000000000000000000000000000000000..053ba6133546382ecb6e3dff4aff76ba4edef85a
--- /dev/null
+++ b/webrtc/p2p/quic/quictransport.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_P2P_QUIC_QUICTRANSPORT_H_
+#define WEBRTC_P2P_QUIC_QUICTRANSPORT_H_
+
+#include <string>
+#include <map>
+
+#include "webrtc/p2p/base/transport.h"
+#include "webrtc/p2p/quic/quictransportchannel.h"
+
+namespace cricket {
+
+class P2PTransportChannel;
+class PortAllocator;
+
+// TODO(mikescarlett): Refactor to avoid code duplication with DtlsTransport.
+class QuicTransport : public Transport {
+ public:
+ QuicTransport(const std::string& name,
+ PortAllocator* allocator,
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate);
+
+ ~QuicTransport() override;
+
+ // Transport overrides.
+ void SetLocalCertificate(
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override;
+ bool GetLocalCertificate(
+ rtc::scoped_refptr<rtc::RTCCertificate>* certificate) override;
+ bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) override {
+ return true; // Not needed by QUIC
+ }
+ bool GetSslRole(rtc::SSLRole* ssl_role) const override;
+
+ protected:
+ // Transport overrides.
+ QuicTransportChannel* CreateTransportChannel(int component) override;
+ void DestroyTransportChannel(TransportChannelImpl* channel) override;
+ bool ApplyLocalTransportDescription(TransportChannelImpl* channel,
+ std::string* error_desc) override;
+ bool NegotiateTransportDescription(ContentAction action,
+ std::string* error_desc) override;
+ bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel,
+ std::string* error_desc) override;
+
+ private:
+ rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_;
+ rtc::SSLRole local_role_ = rtc::SSL_CLIENT;
+ rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_;
+};
+
+} // namespace cricket
+
+#endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_
« no previous file with comments | « webrtc/p2p/p2p.gyp ('k') | webrtc/p2p/quic/quictransport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698