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

Unified Diff: net/quic/quartc/quartc_stream.h

Issue 2324833004: Define Stable API for WebRTC/Quartc (Closed)
Patch Set: Modification of AtExitManager. Created 4 years, 2 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
Index: net/quic/quartc/quartc_stream.h
diff --git a/net/quic/quartc/quartc_stream.h b/net/quic/quartc/quartc_stream.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb75b5465fddd6918b6ebc66ad427cf993d88c77
--- /dev/null
+++ b/net/quic/quartc/quartc_stream.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2016 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 NET_QUIC_QUARTC_QUARTC_STREAM_H_
+#define NET_QUIC_QUARTC_QUARTC_STREAM_H_
+
+#include "net/quic/core/quic_session.h"
+#include "net/quic/core/reliable_quic_stream.h"
+#include "net/quic/quartc/quartc_stream_interface.h"
+
+namespace net {
+
+// Implements a QuartcStreamInterface using a ReliableQuicStream.
+class NET_EXPORT_PRIVATE QuartcStream : public ReliableQuicStream,
+ public QuartcStreamInterface {
+ public:
+ QuartcStream(QuicStreamId id, QuicSession* session);
+
+ ~QuartcStream() override;
+
+ // ReliableQuicStream overrides.
+ void OnDataAvailable() override;
+
+ void OnClose() override;
+
+ void OnCanWrite() override;
+
+ // QuartcStreamInterface overrides.
+ uint32_t stream_id() override;
+
+ uint64_t buffered_amount() override;
+
+ bool fin_sent() override;
+
+ void Write(const char* data,
+ size_t size,
+ const WriteParameters& param) override;
+
+ void Close() override;
+
+ void SetDelegate(QuartcStreamInterface::Delegate* delegate) override;
+
+ private:
+ QuartcStreamInterface::Delegate* delegate_ = nullptr;
+};
+
+} // namespace net
+
+#endif // NET_QUIC_QUARTC_STREAM_H_

Powered by Google App Engine
This is Rietveld 408576698